Retrieving nodes outside navigator?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
DavidJessurun

Retrieving nodes outside navigator?

Post 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!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Retrieving nodes outside navigator?

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
DavidJessurun

Re: Retrieving nodes outside navigator?

Post by DavidJessurun »

Well, I really only need to know how many top level pages I have...
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3483
Joined: Mon Nov 28, 2011 9:29 am
Location: The Netherlands

Re: Retrieving nodes outside navigator?

Post 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.
Locked

Return to “CMSMS Core”