Include Topic List in Autonav?

Permalink
I'm working on a responsive navigation for a customer. I'm using concrete5.7's AutoNav block with a customized view template. The fullscreen overlay is working and lists links to the top-level pages. Under the first and second links (see attached image), I need the following:

First Navigation Link (Projects page): A topic_list that filters a page_list block on the Projects page.

Second Navigation Link (Services page): A list of its direct child pages.

Should I programmatically include the topic_list Block in my AutoNav custom view? Is it possible to access and list topics from the AutoNav block? How can I list child pages for only the second navigation links?

I really don't know how to approach this. Any pointers would be much appreciated.

1 Attachment

 
publicb replied on at Permalink Reply
Figured out how to list the child pages of the Services pages under the second navigation link (see image attachment).

Inside the foreach that cycles through the $navItems in my custom autonav view template, I've added the following code.

if($name == 'Services'){
        $servicesPageChildren = $ni->cObj->getCollectionChildren();
        echo '<ul>';
        foreach($servicesPageChildren as $child) {
            echo '<li><a href="' . $child->getCollectionLink( $appendBaseURL = false) .'">' . $child->getCollectionName() . '</a></li>';
        }
        echo '</ul>';
    }


This creates a nested list under the first navigation link. Don't know if this is the best way to do this, but it works. Now I have to find out about the list of topics under the first navigation link...