The archive page has a media picker, alias factSheetsArchive. From the funds page I would like to check if the a media folder has been selected on the archibe page. If so then display a link to that page.
The error in the first attempt is that your're saying "select the descendant node that has a factSheetArchive property" - so you're actually selecting the 'Archive' node instead of the property. You can do a couple of things to correct it:
1. If the Archive node is a child of Funds, do this:
That'll only work when the current page is the parent of the page with id="1275" - you can use the GetXmlNodeById() function to grab that node, regardless of your current position:
Create link to child page
Hi All
I have the following scructure:
Funds
-Archive
The archive page has a media picker, alias factSheetsArchive. From the funds page I would like to check if the a media folder has been selected on the archibe page. If so then display a link to that page.
I'm not getting any errors, but also no link?
Umbraco 4.0.4.2
Thanks
Eddie
instead of
Hi
That was my thinking, but the link is not displayed?
Thanks
Eddie
Hi
Just tried this, which does produce a link. Regardless of whether a folder has been selected?
Also tried and removed the currentPage
but this resulted in no link?
Thanks
Eddie
Hi Eddie,
The error in the first attempt is that your're saying "select the descendant node that has a factSheetArchive property" - so you're actually selecting the 'Archive' node instead of the property. You can do a couple of things to correct it:
1. If the Archive node is a child of Funds, do this:
2. You could just add the property to the XPath to actually select it:
/Chriztian
Hi again,
Just realized that that won't even work because you're inside the root template, so the context is wrong - you need to add $currentPage to the mix:
/Chriztian
Hi /Chriztain
Thanks for this, still no joy.
The archive page has an id of 1275, so as a test I've updated the xslt to:
But again, still no link.
Is the if test conditon correct? If I remove this I get an error, from the following:
Thanks
Eddie
Sorry, just saw your last post, so added to the above test, but still the same?
Hi Eddie,
That'll only work when the current page is the parent of the page with id="1275" - you can use the GetXmlNodeById() function to grab that node, regardless of your current position:
/Chriztian
is working on a reply...