Copied to clipboard

Flag this post as spam?

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


  • Onur 12 posts 32 karma points
    Feb 25, 2013 @ 18:33
    Onur
    0

    NodeId Control

    Hi.i have a very simple question. i wanna write somthing like this in xslt.

    if(nodeId==1092)

    but i couldn't write this in xslt.please help me. 

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 25, 2013 @ 18:49
    Jan Skovgaard
    0

    Hi Onur

    I took the liberty to move your post to the XSLT forum.

    To do the above in xslt you would do it this way.

    <xsl:if test="$currentPage/@id !='1092'>
    <!-- Code goes here -->
    </xsl:if>

    What is it you're trying to achieve?

    /Jan

  • Onur 12 posts 32 karma points
    Feb 25, 2013 @ 19:07
    Onur
    0

    Hi Jan.Thank you for answer.But it didnt work.there is char mistake.Can you check this again.

    am trying to add link to titles that has this id.

  • Onur 12 posts 32 karma points
    Feb 25, 2013 @ 19:08
    Onur
    0

    <xsl:if test="$currentpage/@id=='1092'">
                <href="{umbraco.library:NiceUrl(current()/@id)}">Devam...</a>
              </xsl:if>

    where am i doing wrong?


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 25, 2013 @ 19:13
    Jan Skovgaard
    0

    Hi Onur

    You have two equal signs instead of one.

    <xsl:if test="$currentPage/@id='1092'">
    <!-- Code goes here -->
    </xsl:if>

    What is it that you're trying to achieve? Is it just setting the above link or is there more to it?

    /Jan

  • Onur 12 posts 32 karma points
    Feb 25, 2013 @ 19:16
    Onur
    0

    I found where i am doing wrong.Thank you Jan :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies