autonav/pagelist in templates

Permalink
Can someone either explain or point me to the spot in the doumentation that goes over adding custom pagelist (or perhaps more appropriately, autonav) areas to a template. I'd like to set up a secondary nav built into one of my template that lists only the subpages of a specific section.

My page structure looks like this:
Home
-Schedule
--Monday
---Page1
---Page2
---Page3
--Tuesday
---Page1
---Page2
---Page3

-Wednesday
---Page1
---Page2
---Page3


I'd like the pages in this section to display those options at the top, like so:

Monday Tuesday Wednesday
Page1 Page2 Page3
Page1 Page2 Page3
Page1 Page2 Page3

I can do this manually by adding three new Area divs to the top of the template and placing the appropriate page lists in the editable region of each page. But I don't want to have to do that manually for every page.

Any hints would be greatly appreciated.

Thanks

 
okhayat replied on at Permalink Reply
okhayat
Since the pages with sub-pages you want to display are under Schedule, I would suggest the following:
1. Insert a pagelist block and choose the parent page to be Schedule.
2. Create a custom template at blocks/page_list/templates/vertical.php
3. In the PHP file, loop through the direct childs of the top page (Schedule page) and also loop through the their sub-pages. You can do this using the getCollectionChildrenArray() which will return the list of sub-pages.
4. Create columns for each day, with either a table column or DIVs as you need

Hope this helps.