Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
This is not really a problem but l just for advice and best practice.
I'm currently trying to retrieve all nodes by a particular node type so have done this
umbraco.library:GetXmlAll()//*[@isDoc]/EventItem
As the nodes can be dotted around the site under different node so thought this would be the best way but not sure if its the quickest.
Any advice,pointers much appreciated
Tom
You should be able to do that without calling that method:
<xsl:variable name="events" select="$currentPage/ancestor::root//EventItem" />
This will get all EventItem nodes scattered around the solution - if you need to filter only those in the current site (if you're doing multiple sites, having the root of each site at level 1) do this:
<xsl:variable name="events" select="$currentPage/ancestor-or-self::*[@level = 1]//EventItem" />
/Chriztian
Hi Chriztian,
Cheers, thought there would of been a better way.
Plus would of helped if I spelt nodes correctly as it may of worked early... So glad its the weekend.
Thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get all nodes by node type 4.5.2
Hi All,
This is not really a problem but l just for advice and best practice.
I'm currently trying to retrieve all nodes by a particular node type so have done this
As the nodes can be dotted around the site under different node so thought this would be the best way but not sure if its the quickest.
Any advice,pointers much appreciated
Tom
You should be able to do that without calling that method:
This will get all EventItem nodes scattered around the solution - if you need to filter only those in the current site (if you're doing multiple sites, having the root of each site at level 1) do this:
/Chriztian
Hi Chriztian,
Cheers, thought there would of been a better way.
Plus would of helped if I spelt nodes correctly as it may of worked early... So glad its the weekend.
Thanks
Tom
is working on a reply...