Accordion Menu Block
PermalinkJust wondering if anyone has developed a working Accordion block for C5 yet? I am a hack when it comes to PHP but was hoping one of you clever guys or gals out there have achieved this?
I tried this:http://www.concrete5.org/community/forums/block_requests/accordion_...
however it throws errors and the thread appears to not be getting any replies from the original poster.
Any pointers would be great.
Richard
but,not perfect.
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $aBlocks = $controller->generateNav(); $c = Page::getCurrentPage(); echo("<div id=\"accordion\">"); $nh = Loader::helper('navigation'); foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav')) { echo('<h3><a href="#">' . $_c->getCollectionName(). '</a></h3>'); ?> <div class="ccm-page-list-description"> <?php if ($c->getCollectionID() == $_c->getCollectionID()) { } else {
There's my own Area Splitter which includes an accordion template from jQuery UI :-)
And there's one created by jgarcia I think in the marketplace and a free one created by remo.
/blocks/page_list/templates/accordion.php