Copied to clipboard

Flag this post as spam?

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


  • Uros Sankovic 107 posts 134 karma points
    Apr 09, 2010 @ 13:15
    Uros Sankovic
    0

    attributes in <a> tag

    Hi guys,

    I want to add attributes to <a> tag,but how can I do that?

    Here's my case:

    <a class="curtainIt screenshot" id="activity_thumb1.jpg" href="#vodenje"></a>

     

    THX for help.

     

    Uros

  • Petr Snobelt 923 posts 1535 karma points
    Apr 09, 2010 @ 13:58
    Petr Snobelt
    0

    Tlhere are two ways - you can add xslt in {} or use xsl:attribute, here is sample

    <a href="{xslt here}">
     <xsl:attribute name="class">
      <if test="something">myclass</xsl:if>
     </xsl:attribute>
    </a>

    Petr

  • Uros Sankovic 107 posts 134 karma points
    Apr 09, 2010 @ 14:28
    Uros Sankovic
    0

    THX for your reply. Do I need to make macro just for the link attributes? If I have some text and inside that text one word is a link with attributes,how can that be done?

    THX again, i'm a newbie, so any help will be appreciated.

  • Petr Snobelt 923 posts 1535 karma points
    Apr 09, 2010 @ 21:23
    Petr Snobelt
    0

    Try look at folowing post, its about keywords and descriptions but same principle can be used on link.

    http://our.umbraco.org/forum/templating/templates-and-document-types/5755-Add-meta-description-and-keywords

  • 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