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 ForumsForm and ListForm and ListURL FieldURL Field
Previous
 
Next
New Post
5/16/2008 2:15 PM
 
URL Field  Modified By Anthony Sansone  on 7/6/2008 2:14:13 PM

When I include the URL Column in my XSL List View, I get a link that is too long.

I want to href a ( website View Website ) link similar to the ( detail View Profile ) link.

Here's an example webpage with the ( website View Website ) link implemented but not working:
http://www.graphicsphere.net/Modelers/tabid/82/Default.aspx

Why doesn't this work?
When you click on the link it opens up in a new window with extra parameters in the address bar.

Another thing I could try is to change the URL Column to Text datatype but then I need an if statement
that removes the {udt:Website} text field from Sebastian's <xsl:for-each select="//udt:Fields"> statement.

 
New Post
5/20/2008 10:06 PM
 

Here's my XSL List view code I need help with:

<xsl:template match="udt:Data" mode="list">
  <xsl:param name="from" select="1" />
  <xsl:param name="to" select="count(*)" />
  <xsl:variable name ="imgColumn" select="//udt:Fields[udt:FieldType='Image'][1]/udt:ValueColumn"/>
  <xsl:variable name ="titleColumn" select="//udt:Fields[udt:FieldType='String'][1]/udt:ValueColumn"/>
  <xsl:variable name="id" select="udt:UserDefinedRowId"/>
  <xsl:if test="position() &gt; $from and position() &lt; $to">
   <table cellspacing="0" cellpadding="4" width="400" style="border: silver 1px solid; border-collapse: collapse;">
    <tr>
     <td>
      <table cellspacing="0" cellpadding="2" border="0">
       <tr>
        <td>
         <xsl:call-template name="EditLink" />
        </td>
        <td valign="middle">
         <xsl:value-of select="//udt:Data[udt:UserDefinedRowId=$id]/*[name()=$imgColumn]" disable-output-escaping="yes"/>
        </td>
        <td>
         <table cellspacing="0" cellpadding="2" border="0" style="padding-left:2px;">
          <tr>
           <td>
            <strong>
             <xsl:value-of select="//udt:Data[udt:UserDefinedRowId=$id]/*[name()=$titleColumn]" disable-output-escaping="yes"/>
            </strong>
           </td>
          </tr>
          <tr>
           <td>
            <xsl:value-of select="udt:City" disable-output-escaping="yes" />, <xsl:value-of select="udt:State" disable-output-escaping="yes" />, <xsl:value-of select="udt:Country" disable-output-escaping="yes" />
           </td>
          </tr>
          <tr>
           <td>
             <xsl:call-template name="ViewProfile" /><xsl:call-template name="ViewWebsite" />
           </td>
          </tr>
         </table>
        </td>
       </tr>
      </table>
     </td>
    </tr>
   </table>
   <br />
  </xsl:if>
 </xsl:template>
<xsl:template name="ViewWebsite">
  <a target="_blank" href="{udt:Website}">
    <img border="0" width="12" height="12" alt="website" src="{//udt:Context/udt:ApplicationPath}/images/icon_solutions_16px.gif" /><>View Website</font>
  </a>
</xsl:template>

 
New Post
5/22/2008 4:22 AM
 

The UDT Statement that prints out all the visible fields except the Image, Title & URL Columns:

<xsl:for-each select="//udt:Fields">
       <xsl:variable name="NameOfValueColumn" select="udt:ValueColumn"/>
       <xsl:variable name="CurrentValue" select="//udt:Data[udt:UserDefinedRowId=$id]/*[name()=$NameOfValueColumn]"/>
       <xsl:if test ="$CurrentValue and $CurrentValue!='' and ($NameOfValueColumn!=$imgColumn or not($imgColumn)) and ($NameOfValueColumn!=$urlColumn or not($urlColumn)) and ($NameOfValueColumn!=$titleColumn  or not($titleColumn)) and (udt:Visible='true' or udt:Visible='True')" >
        <tr>
         <xsl:if test="(position() mod 2 = 1)">
          <xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
         </xsl:if>
         <td class="subhead" align="right" >
          <xsl:value-of select ="udt:FieldTitle"/>:
         </td>
         <td>&#160;</td>
         <td class="Normal" align="left">
          <xsl:choose>
           <xsl:when test="udt:FieldType='Currency'">
            <xsl:value-of select='format-number($CurrentValue, "$###,##0.00")' disable-output-escaping="yes"/>
           </xsl:when>
           <xsl:when test="udt:FieldType='Int32' and udt:FieldTitle!='Year'">
            <xsl:value-of select='format-number($CurrentValue, "###,##0")' disable-output-escaping="yes"/>
           </xsl:when>
           <xsl:otherwise>
            <xsl:value-of select="$CurrentValue" disable-output-escaping="yes"/>
           </xsl:otherwise>
          </xsl:choose>
         </td>
        </tr>
       </xsl:if>
      </xsl:for-each>

 
New Post
5/23/2008 4:07 PM
 

Please try  {udt:Website_UDT_Url}

Hidden columns are discribed inside documentation. There are also links to the hidden columns help inside manage udt and Token2Xsl editor. You can query the XML representation of the UDT data using the action menu.

 
New Post
5/24/2008 12:40 AM
 

Thanks, that worked perfectly. Even the linkclick.aspx works when the link is clicked.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListURL FieldURL Field


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