List pages of certain documenttypes from top Options
ChristophS
Posted: Wednesday, February 27, 2008 9:09:12 AM
Rank: Devotee

Joined: 2/4/2008
Posts: 38
Hi,

Is there a certain way in XSLT to list all the pages of a certain documenttype.
So I've got this structure:

Content
-Home
--News
---News article 1
---News article 2
---Archive
--Events
---Event page 1
---Event page 2
--Projects
---Project page 1
---Project page 2
etc., etc.

Is it possible that I want to list e.g. the pages with documenttype 'News article' on the 'Projects' page? So I just want to list all documenttypes of 'News article' or something else starting from the top Content.

Thanks for any help!

drobar
Posted: Wednesday, February 27, 2008 9:27:18 AM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,696
Location: KY, USA
Didn't we cover that before, in this thread? http://forum.umbraco.org/xslt/how-to-list-lowest-level


To find news articles below the current page you're visiting...
Code:

<xsl:for-each select="$currentPage/descendant::node [@nodeTypeAlias = 'News Article' 
                         and string(data [@alias='umbracoNaviHide']) != '1' ]"> 


To find new articles anywhere in the site...
Code:

<xsl:for-each select="umbraco.library:GetXmlAll()/descendant-or-self::node [
                         @nodeTypeAlias = 'News Article' 
                         and string(data [@alias='umbracoNaviHide']) != '1'
                         ]"> 


For a more complete discussion, check out this thread... http://forum.umbraco.org/20430

cheers,
doug.




MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.