I'm trying to pull some content out of documents at a specific level, I'm struggling to get the documents at just that level and not the level above also...I'm also having problems grabbing the document properties out of the pages at the correct level.
Here's my document structure:
Home Gallery Project Folder (commercial) Project 1 Project 2
Hey Dan, do you know how i could go about grouping with this method? I'm trying to insert a div every 12th item using the code below, but it returns blank.
List pages at defined level
Hi,
I'm trying to pull some content out of documents at a specific level, I'm struggling to get the documents at just that level and not the level above also...I'm also having problems grabbing the document properties out of the pages at the correct level.
Here's my document structure:
Home
Gallery
Project Folder (commercial)
Project 1
Project 2
Project Folder (residential)
Project 1
Project 2
Here's the code I'm using so far:
Thanks!
Amir
Also, how would I go about grabbing the 1st document from folder 1, then the first from folder 2, then the 2nd from folder 1, etc?
To get all nodes at a given level you can access the Level propety of each dynamic node. So you could do this:
Check out http://our.umbraco.org/wiki/reference/code-snippets/razor-snippets for more info on how to use Razor.
PS. I resisted the urge to making any boxing jokes :D
Thanks Dan!
Hi, i got this snippet
It gives nothing out.
Any solution?
Tobias, are you using Umbraco 5? It has a different API so not everything works the same as 4. Your best asking in the Umbraco 5 forum.
Hey Dan, do you know how i could go about grouping with this method? I'm trying to insert a div every 12th item using the code below, but it returns blank.
Got it!
That's it, Amir! Basic rule is that you perform grouping after all other filters. Same (usually) goes for things like Take() and Skip().
is working on a reply...