Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • vaibhav 119 posts 139 karma points
    Aug 12, 2011 @ 08:44
    vaibhav
    0

    problem in applying link

    Hi,

    I am having one node & its sub nodes something like this....

    Node

    >>Node1

         >>Node1SubNode1

         >>Node1Subnode2

         >>Node1Subnode3

    >>Node2

         >>Node2SubNode1

         >>Node2Subnode2

         >>Node2Subnode3

     

    Here i am showing data of the Node1SubNode1 , Node1SubNode2 , Node1SubNode3 , Node2SubNode1 , Node2Subnode2 , Node2Subnode3  in the node page.

    I am able to show the text & image but link which i apply to the text is not appearing properly ....

    wats wrong i m doing .....Here is my xslt code which shows all above node in the list in mmain node....

    <xsl:template match="/">
        <xsl:for-each select="$currentPage/*[@isDoc and string(umbracoNaviHide) != '1']">
          <br/>
       <div id="pubSection">
         <div id="pubSectionHeader">
         <xsl:value-of select="@nodeName"/>
         </div>
          <xsl:for-each select="././*[@isDoc]">
            <div id="pubArticle">
              <div id="pubImage"><img src="{./pubThumbnail}" alt="" width="115px" height="90px"/></div>
              <div id="pubContentArea">
              <div id="pubHeader"><xsl:value-of select="pubHeader"/></div>
                <div id="pubContent"><a href="{pubSelectfile}"><xsl:value-of select="umbraco.library:TruncateString(umbraco.library:ReplaceLineBreaks(pubContent),190,'')"/> >> </a>
                </div>
              </div>

            </div>
             </xsl:for-each>
           </div>
         </xsl:for-each>    
    </xsl:template>

    pubSelectfile is alias of the upload control where i will select the some pdf file ....this pdf file will oopen when i click on the text ....

    can any one help me .....

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 12, 2011 @ 08:59
    Fuji Kusaka
    0

    Hi Vaibhav,

    From what i understand is that you have an upload field for your pdf? If you can try to check first if any pdf file has been uploaded.

    Try changing

    <ahref="{pubSelectfile}"><xsl:value-ofselect="umbraco.library:TruncateString(umbraco.library:ReplaceLineBreaks(pubContent),190,'')"/>>> </a>
    <xsl:variable name="pdfFile" select="pubSelectfile" />
     <xsl:if test="$pdfFile!= ''">
                  <a target="_blank">               
                    <xsl:attribute name="href">                    
                       <xsl:value-of select="pubSelectfile"/>                                  
                    </xsl:attribute><xsl:value-ofselect="umbraco.library:TruncateString(umbraco.library:ReplaceLineBreaks(pubContent),190,'')"/>>>  
                </a>
     </xsl:if>    

    Hope this helps

  • vaibhav 119 posts 139 karma points
    Aug 12, 2011 @ 09:32
    vaibhav
    0

    Thanx Fuji ...it wworked for me ....

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 12, 2011 @ 09:34
    Fuji Kusaka
    0

    No worries....good to hear you got it working

     

    //fuji

Please Sign in or register to post replies

Write your reply to:

Draft