Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Iterate pages in folder

Iterate pages in folder

Kurt Moskjær Andersen
Kurt Moskjær Andersen
Reply

Hi,

Is it possible to iterate pages below a certain folder in the content-tree, with Razor?

I've had a look into the database, and it seems they are created just like normal pages, with the option PageIsFolder set to 1.

Best regards
Kurt Moskjaer Andersen


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Kurt

Yes, you can find all pages under a subnode by asking the pageservice.

http://doc.dynamicweb.com/api/html/91fd0116-1d77-a43b-83e0-ed140ebb478b.htm

So something like "for each page in ServiceLocator.Current.GetPageService().GetPagesByParentID(123)"

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum