Multiple menus

7 posts by 2 authors in: Forums > CMS Builder
Last Post: November 19, 2014   (RSS)

By claire - November 17, 2014

Hi Tim

You've only got to rename the functions there in the members chunk of code, if I recall right. Like so:

// load member pages
list($member_categories, $member_selectedCategory) = getCategories(array(
'tableName' => 'member_pages',
'ulAttributesCallback' => 'customMenuUlAttrMembers', // ADVANCED: custom function to return ul attributes, eg: myUlAttr($category);
'liAttributesCallback' => 'customMenuLiAttrMembers', // ADVANCED: custom function to return li attributes, eg: myLiAttr($category);
));

function customMenuUlAttrMembers($category) {
return ($category['_hasParent'] && $category['depth'] == '1')? "class=\"dropdown-menu\" role=\"menu\"" : "" ;
}


function customMenuLiAttrMembers($category) {
return ($category['_hasChild'] && $category['depth'] == '0')? 'class="dropdown"': "" ;
}

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Thanks Claire.

It's progressed but I'm getting the error:  

Notice: Undefined index: _listItemStart in /home/qcwa/public_html/assets/modules/_topNavigation.php on line 39 test 1

Notice: Undefined index: _listItemStart in /home/qcwa/public_html/assets/modules/_topNavigation.php on line 39 test 2

"test 1" and "test 2" are the test page i've created in member_pages, so it's getting the content just fine.  However, it's not liking the 

<?php echo $member_selectedCategory['_listItemStart'] ?> 

Thoughts?

Cheers,

Tim (toledoh.com.au)

By claire - November 19, 2014

Sorry Tim, this isn't ringing any bells. I'll refer this to Dave, he knows the category setup pretty well.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Thanks for chasing it Claire!

Cheers,

Tim (toledoh.com.au)

Hey Claire - I just tried again and it seems to be working based on you last advice!  Sorry!  and Thnaks!

Cheers,

Tim (toledoh.com.au)

By claire - November 19, 2014

Ah okay, no worries :) I'll tell Dave not to worry about it. Let us know if you're still having issues.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/