I tried installing nicemenus to control my primary links, but it was too much hassle to get it to work properly (and the same) in ff and ie. Someone suggested I try simplemenu. At the moment I'm using the Chameleon/Marvin theme. I disabled nicemenus, changed all my css files and my .theme file back to normal, and installed and enabled simplemenu. I configured it for primary links, and to prepend to the body. My site is here. The primary links are running under the site logo.

It would appear that even though I've enabled simplemenu, it isn't taking. I've cleared my local cache and the db cache. Any ideas? Thanks in advance.

Comments

jrabeemer’s picture

You have to make sure the permissions for this module are enabled. There is a view permission which determines which role can see the menu.

sillygwailo’s picture

No, SimpleMenu doesn't actually display in Chameleon. This is with the #1 user, so it has permissions to see SimpleMenu.

m3avrck’s picture

does this still apply with the new 5.0 version?

sillygwailo’s picture

The (very quick) test that I did shows that SimpeMenu still doesn't display in Chameleon. Is it because Chameleon is not a PHPTemplate theme?

motin’s picture

The solution _is_ a one-liner:

Add these lines just above "$output = "

// Needed for chameleon theme to include SimpleMenu js+css
$variables = array(
'closure' => theme('closure'),
);

Cheers,

Fredrik

motin’s picture

The solution is more or less a one-liner:

Add these lines:

  // Needed for chameleon theme to include SimpleMenu js+css
  $variables = array(
    'closure'             => theme('closure'),
  );

just above:

  $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
  $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"$language\" xml:lang=\"$language\">\n";

in chameleon.theme (= just above Line 39).

Cheers,

Fredrik

m3avrck’s picture

Title: enabled but not enabled? » chameleon theme not outputting $closure variable
Project: SimpleMenu » Drupal core
Version: 5.x-3.2 » 7.x-dev
Component: Code » theme system

Seems like that is an issue with the chameleon theme and should be an issue for core...

ainigma32’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

On line 118 of chameleon.theme the closure is called:

  $output .=  theme_closure();

The problem is that hook_footer of simple_menu is adding css through drupal_add_css and that chameleon already called drupal_get_css on line 48 so the added css is never included in the page.

Using motin's fix theme_closure (and effectively) hook_footer is called twice; once before outputting the header and once on line 118 as mentioned above.

To use motin's fix and prevent hook_footer from being called twice we could call theme_closure before outputting the header and catch the returned values (if any).

Then we output the page and finally we output the result of theme_closure before we close the body tag.

I've attached a patch for testing and discussion.

- Arie

ainigma32’s picture

Category: support » bug

No reviews yet. Setting this to bug report to get some attention. Arguably it is a bug.

- Arie

ainigma32’s picture

Bumping this issue one last time.

- Arie

ainigma32’s picture

Status: Needs review » Closed (won't fix)

Judging from the overwhelming attention it looks like this patch is not 'popular' enough to be tested or applied.

- Arie

mr.baileys’s picture

Status: Closed (won't fix) » Needs review

looks like this patch is not 'popular' enough to be tested or applied.

I agree with you that this can be called a bug, so I'd leave it as CNR until someone finally decides to review it, even though it's not popular. Chameleon is currently broken (#374650: Chameleon broken by hook_page_alter), so this patch will probably have to be re-rolled after that has been resolved.

I wouldn't mind applying/testing/reviewing this patch after that one has landed...

mr.baileys’s picture

Project: Drupal core » Chameleon
Version: 7.x-dev » 7.x-1.x-dev
Component: theme system » Code
Status: Needs review » Needs work
ainigma32’s picture

Status: Needs work » Needs review
StatusFileSize
new982 bytes

OK rerolled for chameleon contributed theme.

- Arie

johnalbin’s picture

Status: Needs review » Fixed

Fixed when converted to phptemplate theme.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.