Copied to clipboard

Flag this post as spam?

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


  • syn-rg 282 posts 425 karma points
    Feb 28, 2012 @ 02:41
    syn-rg
    0

    Link to doctype

    How can I add a link to doctype?

    I have a doctype called "ProjectGallery-Technology" and want to link to that.

    Here's what I've got so far, the link to the parent node is simple, but the link to the Technology node which is at the same level as the parent node is difficult:

    <xsl:variable name="documentTypeAlias" select="string('ProjectGallery-Technology')"/>
    <a href="{umbraco.library:NiceUrl($currentPage/parent::*/@id)}" title="{$currentPage/parent::*/@nodeName}">
          <xsl:value-of select="$currentPage/parent::*/@nodeName"/></a>
    <xsl:if test="$currentPage/displayInTechnology != '1'">&nbsp;<a href="#">Technology</a></xsl:if>

    Any ideas?

    Cheers,
    JV

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Feb 28, 2012 @ 09:50
    Lee Kelleher
    1

    Hi JV,

    OK, not 100% sure what you are trying to achieve, so this is a long shot...

    <a href="{umbraco.library:NiceUrl($currentPage/../*[@isDoc and name() = $documentTypeAlias]/@id)}">Technology</a>

    Cheers, Lee.

  • syn-rg 282 posts 425 karma points
    Feb 29, 2012 @ 01:32
    syn-rg
    0

    Thanks Lee,

    I got it to work with the following, thanks for your help getting me on the right path

    <a title="Technology" href="{umbraco.library:NiceUrl($currentPage/../../*[@isDoc and name() != 'ProjectGallery' and name() != 'ProjectGallery-Government']/@id)}">

    Cheers, JV

Please Sign in or register to post replies

Write your reply to:

Draft