Jquery menu using the concrete5 sitemap - how to

Permalink
How can i implement a jquery menu, so the menu still uses the concrete5 sitemap navigation links?

 
mkly replied on at Permalink Reply
mkly
In add.php/edit.php
$page_selector_form = Loader::helper('form/page_selector');
$page_selector_form->('block_field_name');


That should give you the "Select Page" block that upon selecting with fill in a hidden input with the cID(Collection ID) of the page selected and gets passed back to the block controller as the block_field_name you passed in.

Reading you question again... do you mean create a navigation menu from your site menu?

If so you can do this with the autonav block. You can create a new template and place it in the
/blocks/autonav/templates/my_new_template.php
(you'll need to create that)

You can either copy one of the current templates in
/concrete/blocks/templates


Or you can check outhttps://github.com/jordanlev/c5_clean_block_templates... and user /autonav/view.php (file renamed to something of your choice)
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
The Autonav controller creates a hierarchy of lists that are then turned into menus by the view. What you probably want to do is replace the view with your own menu .

Start with the improved autonav view to get a hierarchy of lists:
http://www.concrete5.org/community/forums/customizing_c5/new-cleane...
(its the forum post that point to the templates mkly mentions above)

(Nice and clean and easy to understand the DOM)

Create an alternate view based on this and adapt the classes and DOM to suit your jquery needs.
http://www.concrete5.org/documentation/how-tos/developers/change-th...

Make sure the C5 version of jQuery (and any plugins) are loaded from a page or block controller or in your theme header using addHeaderItem (beware of loading any fn from 2 different files and causing repeat fn definition errors).

Put a bit of jquery in a document ready handler at the bottom of your alternate view to attach your menu plugin to the dom of the view.
berteldk replied on at Permalink Reply
Thank you guys - just what i needed, i will read up on the different choices and get back to ya if i end up having more problems!

Thank you for your time.