2 new menus ... but each with a different class ... why?

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
dsdsdsdsd
Joomla! Intern
Joomla! Intern
Posts: 95
Joined: Mon Sep 26, 2011 8:42 am

2 new menus ... but each with a different class ... why?

Post by dsdsdsdsd » Sat Jan 12, 2013 5:12 pm

hello;

I have created two menus. One has a class of "module" (+ the class suffix of '_menu'). But the other has a class of "moduletable" ( + the class suffix of '_menu').

I do not know why the second menu ended up with moduletable. I have already set the css for the 'module' (+ '_menu'), and I want joomla to naturally apply that same style to my new menu.

any ideas please.

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: 2 new menus ... but each with a different class ... why?

Post by ranwilli » Sun Jan 13, 2013 2:11 pm

Check the code for the module position in the template, I suspect you'll see there's a difference in the "style" attributes there...

Make them both like the one that works for you
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

dsdsdsdsd
Joomla! Intern
Joomla! Intern
Posts: 95
Joined: Mon Sep 26, 2011 8:42 am

Re: 2 new menus ... but each with a different class ... why?

Post by dsdsdsdsd » Sun Jan 13, 2013 3:05 pm

ranwilli, thanks for responding.

I went into the template's index.php and found:

<jdoc:include type="modules" name="position-7" style="rounded" /> ... which is where the main menu is.

and

<jdoc:include type="modules" name="position-3" style="xhtml" /> ... which is where the new menu is.

Unfortunately I cannot test what happens if I make changes now, as I have replaced the default joomla menus with a 3rd party accordian menu.

However surely this issue will come up again. So the 2 lines of code that I showed you ... is that what you were referring to?

- thanks.

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: 2 new menus ... but each with a different class ... why?

Post by ranwilli » Sun Jan 13, 2013 3:08 pm

Precisely, but there's no reason not to make the change.
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

dsdsdsdsd
Joomla! Intern
Joomla! Intern
Posts: 95
Joined: Mon Sep 26, 2011 8:42 am

Re: 2 new menus ... but each with a different class ... why?

Post by dsdsdsdsd » Sun Jan 13, 2013 3:40 pm

ranwilli, I guess I was expecting to find class = "module" and class = "moduletable" in those snippets.

but instead it was style ="blah"

does the style attribute here get parsed by the joomla framework during joomla-compile-time or possibly load-time?

what exactly does the var/val pair style='rounded' do?

- thanks for your time.

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: 2 new menus ... but each with a different class ... why?

Post by ranwilli » Sun Jan 13, 2013 3:45 pm

Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

dsdsdsdsd
Joomla! Intern
Joomla! Intern
Posts: 95
Joined: Mon Sep 26, 2011 8:42 am

Re: 2 new menus ... but each with a different class ... why?

Post by dsdsdsdsd » Sun Jan 13, 2013 3:48 pm

aha ... nice, thanks
Last edited by ooffick on Mon Jan 14, 2013 11:51 am, edited 1 time in total.
Reason: Mod Note: Removed link to a youtube video


Locked

Return to “General Questions/New to Joomla! 2.5”