1
kevinv
Fetching all submenus in main menu
  • 2006/6/3 19:14

  • kevinv

  • Friend of XOOPS

  • Posts: 44

  • Since: 2003/1/4 1


I'm trying to modify the main menu block to show ALL sub-menu items, not just the ones in the current module.

The main menu block uses the following to build the menu:


<{foreach item=module from=$block.modules}>
<{$module.name}>
<{foreach item=sublink from=$module.sublinks}>
<{$sublink.name}>
<{/foreach}>
<{/foreach}>



Apparently $module.sublinks is only filled out for the current module. Are the other sub-menus available in a different smarty variable, or does this require a code change?

2
kevinv
Re: Fetching all submenus in main menu
  • 2006/6/3 19:36

  • kevinv

  • Friend of XOOPS

  • Posts: 44

  • Since: 2003/1/4 1


I solved this by modifying the code. Not sure if it's the only solution.

Find the system_blocks.php then find the line:
if ((count($sublinks) > 0) && (!empty($xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {


and change it to:
if ((count($sublinks) > 0) && (!empty($xoopsModule))) {

Login

Who's Online

831 user(s) are online (56 user(s) are browsing Support Forums)


Members: 0


Guests: 831


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits