1
davidthomas1
multimenu sublink problem

I using Multimenu 1.7 on XOOPS 2.0.10

I'm trying to replace the main menu.

** Problem 1: **

When I click on a main-link - all the sublinks appear at once.

I tried the hack, in blocks/block.php commenting out :

//Test 1 : link is sub of an active module with same directory
if ( !empty($xoopsModule) && eregi("/".$xoopsModule->getVar('dirname')."/"$link) || $myrow['submenu'] == 1) {
  
$imenu['showsub'] = 1;
  }


But it doesn't work No sublinks appear at all (strangely some subdomain links show up under other menu main-links.

** Problem 2: **

Sublinks do not appear when the target page is in a different directory from the mainlink for that menu-item.

Is it true that sub-links must be in the same directory as the main-link for that menu-item?

** Please help! **

I'm sure other people have had the same problem.

Has anyone :

a) Got MultiMenu displaying sublinks correctly?
b) Got MultiMenu displaying sublinks from unrelated directories?

Please let me know,

thanks.

2
davidthomas1
Re: multimenu sublink problem

Can you use multiMenu to display arbitrary sublinks?

There is not a relationship between the main-link and the sub-links in terms of module pages on my site.

The main-links are categories like 'Services' or 'Publications' and the sub-links link to various relevant pages.

Is it possible to use multiMenu in this instance?

It is certainly behaving strangely when it comes to displaying dynamic sublinks.

3
davidthomas1
Re: multimenu sublink problem

is no one going to help me?

Here's a link to my Multimenu 01 admin screenshot:

http://www.ajet.net/xoops/multimenu-admin-screenshot.jpg

4
indiear
Re: multimenu sublink problem
  • 2005/6/10 10:53

  • indiear

  • Just popping in

  • Posts: 31

  • Since: 2004/11/16


Most people that help here are just people like you and I, they just know about some things and offer free help/advice when they know an answer. Free advice comes when you can get it My guess is that no one that has read your question knows the answer, I do not think someone is saying "I know this but I am not going to help".

So to offer you a response, I don't have a clue outside of editing your theme.html and adding dynamic html and links to those areas from there. Have you seen the themes that have navigation on the top and offer dropdown menus on them? If so that would be your fastest and easiest way to create such a thing, it seems like you are in a rush so I would look at that and ditch the multi-menu because that is not a "built in" option to that module.

5
davidthomas1
Re: multimenu sublink problem

Thanks for your reply,

I think you're right.

Most people read this post and don't have a quick answer.

I think I've actually been using multiMenu for the wrong purpose.

I need to create a custom-menu that is unrelated to the XOOPS modules. I want it to be like an independent block with sub-links that expand when the main link is clicked.

I think multiMenu is designed to work closely with XOOPS modules. sub-links only expand when you're on the same module page - they are closely tied to the module URL.

I basically need an module-independent custom menu block with expandable sublinks.

I'm going to go ahead and create a custom block using javascript to create an expanding menu. That will work.

You're right there is a bit of a rush! Our new website is going live next week and I need a new menu set up before then. After that we've got a few thousand new teachers arriving in Japan and the new site and online membership system has to be ready by then. It's busy busy but it can be done.

As they say in japanese 'yareba dekiru' - If you try, you can do it

thanks for your response,

D.

6
saintolaf2
Re: multimenu sublink problem
  • 2007/2/13 9:23

  • saintolaf2

  • Just popping in

  • Posts: 3

  • Since: 2004/12/15


Hi

I have the same problem when using multimenu in combination with wiwimod. As I think it is a good idea to handle all "static" information pages with wiwimod, and using multimenu to make menu links as I see fit. As there are no structure in the wiwi pages urls (in the general case), the pattern matching principles of multimenu won't work.

As an intermediate solution to the problem I have hacked wiwimod to use some extra GET variables to "rembember" which menu item was selected, and use that to show submenus.

I edited the file modules/multimenu/blocks/block.php as follows:

Quote:

// Insert these lines
$mm_submen = isset($_GET['mm_submen']) ? intval($_GET['mm_submen']) : 0;
$mm_menu = isset($_GET['mm_menu']) ? intval($_GET['mm_menu']) : 0;
//end insertion

///////////////////////// Create Links /////////////////////////
// SQL query
$sql = "SELECT id, pid, groups, link, submenu, title, target, imageurl, weight
FROM ".$xoopsDB->prefix('multimenu').$options[15]."
WHERE $where
ORDER BY ".$options[3];


Quote:

// Sub link Display
if ( $myrow['link'] ) { $link = $myrow['link']; } else { $link = ''; }
//start insert
if ( $mm_submen && $options[15]==$mm_menu) { $mainid = $mm_submen; }
else {
//end insert

if ( !empty($xoopsModule) &&
eregi( "/".$xoopsModule->getVar('dirname')."/", $myrow['link'] )
&& ( $myrow['submenu'] < 1 || $myrow['submenu'] > 2 )
) { $mainid = $myrow['id']; }

} //also inserted



insert these lines
Quote:

// Insert start: transfer of selected link to next issue.
if ( (eregi('\?', $link)) )
$link = $link."&";
else
$link = $link."?";
$link = $link."mm_submen=".$myrow['pid']."&mm_menu=".$options[15];
//end insert
// Create link
$imenu['link'] = '';
$imenu['linkurl'] = $link;
$imenu['a'] = '
';
} else {
$imenu['link'] = '';
$imenu['linkurl'] = '';
$imenu['a'] = '';
}

Login

Who's Online

363 user(s) are online (288 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits