homepage > subpage doctype "subpage" >child of subpage doctype "GalleryAlbum"
Now I want to use XSLT to place a button in "subpage" which contains a link to the child node with doctype "GalleryAlbum", IF theres is a child node with doctype "GalleryAlbum" ELSE do nothing.
I want to use XSLT beacuse I need the link to be dynamic, so that every page with the doctype "subpage" will show a link to its own specific "GalleryAlbum" child.
I have tried all sorts of ways to do this, but nothing seems to work, so now I would really like to get some fresh eyes on the issue.
I know it's propably simple, but I just can't get it right - hope you guys have some input :)
It should be pretty simple, you can use something like this:
<xsl:template match="/"> <xsl:apply-templates select="$currentPage/GalleryAlbum [@isDoc][1]"/> <!-- The [1] means to only grab the first one, in case you might have multiple GalleryAlbums? --> </xsl:template>
<xsl:template match="GalleryAlbum"> Link to Gallery: <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="@nodeName"/></a> </xsl:template>
insert link to child node with specific name
Hi
I have a structure thats somethins like this:
homepage > subpage doctype "subpage" >child of subpage doctype "GalleryAlbum"
Now I want to use XSLT to place a button in "subpage" which contains a link to the child node with doctype "GalleryAlbum", IF theres is a child node with doctype "GalleryAlbum" ELSE do nothing.
I want to use XSLT beacuse I need the link to be dynamic, so that every page with the doctype "subpage" will show a link to its own specific "GalleryAlbum" child.
I have tried all sorts of ways to do this, but nothing seems to work, so now I would really like to get some fresh eyes on the issue.
I know it's propably simple, but I just can't get it right - hope you guys have some input :)
//Cheers
BTW: I'm using the new schema (4.7.0)
Hi,
It should be pretty simple, you can use something like this:
Hope this helps,
Tom
Hi Tom
This works exactly as intended - I didn't think to do the selecet like that, but of course that works :)
Thanks a mill :)
is working on a reply...