|
|
Rank: Newbie
Joined: 5/2/2008 Posts: 22 Location: NYC
|
Does anyone know how I might be able to grab the pageName of the parent. For example I have several pages underneath one parent and i want to display the pageName of the Parent in a header. Maybe a way that i can use the ParentID to grab the pagename.
|
|
 Rank: Umbracoholic
Joined: 9/27/2007 Posts: 1,123 Location: Belgium
|
Hi dcrug, If you're using v4, you should be able to use some inline xslt in the template. For a version prior to v4, create a small xlst that grabs the pageName from the parent node of the current node being processed. Code:<xsl:value-of select="$currentPage/parent::node/@pageName" /> or Code:<xsl:value-of select="$currentPage/../@pageName" /> Get the xslt wrapped in a macro and put the macro on the page. Hope that helps. Regards, /Dirk
level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
|
|
Rank: Newbie
Joined: 5/2/2008 Posts: 22 Location: NYC
|
Any idea why my <xsl:value-of select="$currentPage/../@pageName" /> doesn't show up on the page at all. I've been having some issues with that.
|
|
 Rank: Enthusiast
Joined: 2/15/2008 Posts: 40 Location: London, England
|
probably use @nodeName or data[@alias='pageName']
|
|
 Rank: Umbracoholic
Joined: 9/27/2007 Posts: 1,123 Location: Belgium
|
Yep, You're right, rorythecheese, should have been @nodeName. Thanks for correcting me on this. Regards, /Dirk
level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
|
|
Rank: Newbie
Joined: 11/12/2008 Posts: 13 Location: Bombay
|
Hi,
I need the parent page name in umbraco template. How do I get it? @parentId gives me the current page parent id but I need the parent name. How do I get it?
Thanks in advance, Manisha
|
|
 Rank: Umbracoholic
Joined: 9/27/2007 Posts: 1,123 Location: Belgium
|
Hmm, Have you read the complete thread? I've been answering this question before. Ok, let's summarize: If using v4+, use inline xslt in your template to get the name of the parent page A nice tutorial on using inline xslt can be found at: http://umbraco.org/documentation/books/inline-xslt/how-to-use-itIf using a pre v4 version, create a small xslt and accompanying macro to get the desired info. Code can be found in this thread. Regards, /Dirk
level 1 & 2 certified - umbraco MVP 2008/2009 - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
|
|
Rank: Newbie
Joined: 11/12/2008 Posts: 13 Location: Bombay
|
Hi,
If possible can u paste complete xslt code here or else I'll have to figure out the xslt structure and where the line
<xsl:value-of select="$currentPage/../@nodeName" /> needs to be placed. It will save lot of my time.
Thanks, Manisha
|
|
|
Guest |