Page 1 of 1

Retrieving nodes outside navigator?

Posted: Wed Jun 14, 2017 2:00 pm
by DavidJessurun
Hi,

Hope I chose the right board. If not, sorry.

This may be a silly question, but I'm drawing a blank even on how to properly Google it.

If I want to have the site pages and the individual page data in an array like $nodes in Navigator, but in a regular template (so not using Navigator) is this possible? I'm working on a template idea that needs basic site structure info and adding a Navigator template seems like adding overhead and complexity, so I'm mainly looking for simplicity.

TIA!

Re: Retrieving nodes outside navigator?

Posted: Wed Jun 14, 2017 2:13 pm
by calguy1000
The node list is a data structure generated by Navigator and intended only for use within Navigator templates. While it is possible to copy that data to use outside of navigator, it's not really a great idea.

With the flexibility of CMSMS templates there's usually a better way of solving issues like this. It just takes a bit of thinking.

Re: Retrieving nodes outside navigator?

Posted: Wed Jun 14, 2017 9:20 pm
by DavidJessurun
Well, I really only need to know how many top level pages I have...

Re: Retrieving nodes outside navigator?

Posted: Thu Jun 15, 2017 7:46 am
by velden
I would just use Navigator for this;
use the number_of_levels and loadprops parameters to minimalize overhead.

And I guess you're using Navigator anyway so you could use it in the same run with some simple logic.