Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryToken Replacement When RenderingToken Replacement When Rendering
Previous
 
Next
New Post
2/4/2008 11:42 PM
 

Hello,

I am trying to create a bookmark link in the repository from a summary view of a supplier to a more detailed view of a supplier. However, the [TITLE] token is being replaced with a <span> tag. Is there any way to make it so that the <span> tag is not rendered?

Example in template.html:

<table class="normal" width="100%" cellspacing="0" cellpadding="0">
 <tr>
  <td class="normal" align="left" valign="top" width="50%">
   [TITLE]
  </td>
  <td class="normal" align="left" valign="top" width="50%">
   [DESCRIPTION]
  </td>
 </tr>
</table>

I would like to do this:

<table class="normal" width="100%" cellspacing="0" cellpadding="0">
 <tr>
  <td class="normal" align="left" valign="top" width="50%">
   <a href="/Portals/0/SupplierDetails.aspx#[TITLE]">[TITLE]</a>
  </td>
  <td class="normal" align="left" valign="top" width="50%">
   [DESCRIPTION]
  </td>
 </tr>
</table>

Thanks in advance for any solutions offered,

Pat

 
New Post
2/5/2008 2:07 PM
 

sorry, there's no way to do that currently. The problem is that in order to render the title (as well as any of the other data elements) and be able to apply attributes to it such as class, width, etc.  the rendering engine creates a dynamic control, and then injects the control into the web page. So the Title element is actually rendered as a dynamic asp:Label control. ( or an asp:LinkButton if the Download attribute is set for the Title object ), then the cssclass is applied. When asp.net renders the control it automatically wraps the control in a span so that it can apply the styles to the content.

If you're up to code changes, you'd have to add another Token that would simply inject a literal into the HTML, for example... in Repository.ascx.vb, find the lstObject_ItemDataBound() function, then find the case statement for rendering the "TITLE" token. Add a new Case statement...

Case "RAWTITLE"
  objPlaceHolder.Controls.Add(New LiteralControl(objRepository.Name.ToString()))

Then, in your template, use the new [RAWTITLE] token instead of the [TITLE] token, like this... 

<a href="/Portals/0/SupplierDetails.aspx#[RAWTITLE]">[TITLE]</a>

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryToken Replacement When RenderingToken Replacement When Rendering


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out