I have a question. I'm using the following site structure.
-site 1
-- button 1
-- button 2
- site 2
-- button 1
-- button 2
The 'site' document type has three values witch must be displayed on the pages button 1 and 2. So I add the values in the master template. I only see the values when I'am on page site 1 and site 2. But when I'm on the page of button 1 the value is empty. That's not so strange because the value is not in the document type of 'button'. Can I refer to a value of the document type 'site'?
Display value of another document type
Hi,
I have a question. I'm using the following site structure.
-site 1
-- button 1
-- button 2
- site 2
-- button 1
-- button 2
The 'site' document type has three values witch must be displayed on the pages button 1 and 2. So I add the values in the master template. I only see the values when I'am on page site 1 and site 2. But when I'm on the page of button 1 the value is empty. That's not so strange because the value is not in the document type of 'button'. Can I refer to a value of the document type 'site'?
Thanks for your help.
Hey,
Not tested but this should work
Rich
Edit: that will only work on the node when you are in the 'button' nodes, do you have the same template for both?
Rich thanx for your reply, but unfortunately It won't work on page 'button'. I use the same template for both 'sites'.
<xsl:value-of select="$currentPage/ancestor-or-self::*[@level=1]/descendant::NameOfYourDocType[@isDoc]/nameOfPropertyHere"/
That won't work either.
I have the following to things in the macro:
<xsl:value-of select="$currentPage/parent::node/bedrijfsnaam"/>
<xsl:value-of select="$currentPage/ancestor-or-self::*[@level=1]/descendant::Home[@isDoc]/bedrijfsnaam"/>
When I'm on 'site' it displays the value, when i'm on the page, it won't display anything.
Hey Rik,
What's the DocTypeAlias of your 'site' nodes where the property 'bedrijfsnaam' is on?
Rich
Hey Rich,
I checked the Alias called 'Home'.
Rik
Hey Rik,
This should sort it
<xsl:value-of select="$currentPage/ancestor-or-self::* [@isDoc]/descendant-or-self::Home[@isDoc]/bedrijfsnaam" />
Rich
That works :) Thanx you very much!
is working on a reply...