Hello

I've been trying to wrap some basic access control around nice_menus similar to how can be accomplished with normal menus. Below is some code developed (with help from Heine) which "almost" works. It has two issues that I'd appreciate some comment on:

1) This code returns the correct menu, which does blow out to the right on rollover (or as assigned to the Nice_Menu setup for that nice menu code). However, you can't then roll onto the blown out menu. Should I be calling the module differently, or returning the content differently?

2) The menu returned does not fit the block properly the way it does when returned through a standard block definition. It is offset to the right by 6 pixels. Is this again in the way I'm calling the module, or does it have to do with my theme?

Where XX = Nice-Menu number

global $user;
$output = '';
$approved_roles = array('group1','group2');
if ( (is_array($user->roles) ) && (count(array_intersect($approved_roles, $user->roles))>0))
{
  $output = nice_menus_block('view', XX);
}
return $output['content'];

Comments

simon rawson’s picture

This isn't going to be very helpful to you, but I can't reproduce your bugs using your code! (Firefox 1.5) It works exactly as designed :-s

add1sun’s picture

clearing old issues - 4.6 is deprecated

add1sun’s picture

Status: Active » Closed (won't fix)

helps if i change the status