Page 1 of 1

[Closed] Is there a way to list the sub-pages of a page?

Posted: Tue Feb 12, 2008 7:57 pm
by WebAddict
I have looked everywhere, and can't seem to find in any documentation a way to list all of the sub-pages of a page, like a contents listing.

Here is my example:
http://www.pinnaclechandler.com/medical-library/

This pages purpose is to list all of the sub-pages. But these pages change sometimes, and it is hard to have to manage the pages manually, keep links up-to-date.

To link to an individual page, you simply use this code:

Code: Select all

{cms_selflink page='25'}
But you still have to manage each new and removed link manually. So I guess I'd expect a code like this to make it work the way I want (Example Only - not real):

Code: Select all

{cms_subpages type="ol" page="14"}
As you can see from my example page above, this would be handy. Can anyone provide me with the right code, or tell me of a module that provides this functionality?

Re: Is there a way to list the sub-pages of a page?

Posted: Tue Feb 12, 2008 9:38 pm
by WebAddict
Woo Hoo! After reviewing the available Tags themselves, I stumbled upon the 'sitemap' tag. It does exactly what I want it to do. Here is how I'm using it:

Code: Select all

{sitemap start_element="medical-library"}
I tell it that I want a sitemap and to start with all of the sub-pages of "medical-library".

There are other options too, here is the current (v1.2.3) help info for sitemap:
What does this do?
Prints out a sitemap.

How do I use it?
Just insert the tag into your template/page like: {sitemap}

What parameters does it take?
  • (optional) class - A css_class for the ul-tag which includes the complete sitemap.
  • (optional) start_element - The hierarchy of your element (ie : 1.2 or 3.5.1 for example). This parameter sets the root of the menu. You can use the page alias instead of hierarchy.
  • (optional) number_of_levels - An integer, the number of levels you want to show in your menu. Should be set to 2 using a delimiter.
  • (optional) delimiter - Text to separate entries not on depth 1 of the sitemap (i.e. 1.1, 1.2). This is helpful for showing entries on depth 2 beside each other (using css display:inline).
  • (optional) initial 1/0 - If set to 1, begin also the first entries not on depth 1 with a delimiter (i.e. 1.1, 2.1).
  • (optional) relative 1/0 - We are not going to show current page (with the sitemap) - we'll show only his childs.
  • (optional) showall 1/0 - We are going to show all pages if showall is enabled, else we'll only show pages with active menu entries.
  • (optional) add_elements - A comma separated list of alias names which will be added to the shown pages with active menu entries (showall not enabled).

Re: Is there a way to list the sub-pages of a page?

Posted: Thu Feb 14, 2008 6:19 pm
by Pierre M.
Hello,

{menu ...} could have done it too.

If your issue is closed, please prefix your first post with [Closed]. It helps sorting out solutions and open issues.
Have fun with CMSms

Pierre M.