Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Using menu_genius combined rule

Using menu_genius combined rule

Hi there

Thanks for a really amazing extension!  I've been looking for something like this for so long, even suggested similar functionality as a feature for Joomla 1.6 as an extension to the template manager but with no luck...

I've had success implementing basic menu_genius and content_genius rules without great php knowledge with your excellent documentation and forum support.

However, to complete my project I have a problem. My rule looks like this:

if ( $menu_genius->check("menutype = project")
and ( $menu_genius->check( "level = 0" ) )
return true;

Which returns this error:

Parse error : syntax error, unexpected T_RETURN in /home/(my file path)/components/com_metatemplate/helper.php(756) : eval()'d code on line 3

As you can guess, I'm trying to switch the template for the top level of a certain menu, then I will create another rule for the menu items below top level.  The rule works using the first half of the argument but not combined.

Any help very much appreciated,

Dave

Edited By: daviestar
31-May-11 01:27:09

daviestar
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Using menu_genius combined rule

Hi Dave,

the error you're getting is simply because there's a mismatched number of parentheses. Drop the opening parenthesis on the 2nd line and you should be right:

if ( $menu_genius->check("menutype = project")
  and $menu_genius->check( "level = 0" ) )
return true;


Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Using menu_genius combined rule

Thanks Stephen, embarrassed I didn't spot that!

I watched your talk on Metamod/template and was blown away by the possibilities - and so were the developers at my work smile  hopefully we can employ it on a larger scale project soon.

If you want to check out my site it's at www.houseofyum.co.uk (in firefox only for now!).  Click around, there are 5 templates employed just now, and will be 7+ when I manage to get everything out of Photoshop and into Joomla.  Thanks to your work I only have menu items for blog layouts (although possibly don't even need them!). Content is pulled from various sources automatically and Joomla safely handles the different templates and modules without me having to create menu items.  It's still a little rough round the edges but you'll get the idea.

Thanks for your help,

Dave

daviestar
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Using menu_genius combined rule

Cool! I've just been "playing" that flash game on your site... not entirely sure I got all of it, but the "Beautiful-horrible existential" moniker is about right!

Great design on the site.

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5162
Newest User:
david30x73
Members Online:
0
Guests Online:
158

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked