images and styling for each element in menumanager

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
zsero
Forum Members
Forum Members
Posts: 48
Joined: Mon Feb 13, 2006 4:39 pm

images and styling for each element in menumanager

Post by zsero »

In our menu, we have strong styling and HTML code embedded, and thats why we use bulletmenu tag, (yes, thats the ancient {bulletmenu} tag). For explanation, have a look at our site: http://kek.org.hu/

Its a hack, but it works perfectly. We simply put and and other html tag INTO the menu text. Bulletmenu is not as intelligent as MenuManager, and it passes every character to the front-end. That way, the "menu text:" value for our home page is "HOME" for example. Not convinient on the admin side, but works well for all browsers on the front-end site.

The big problem is that this method is stopping us from upgrading to 1.4.1, we have to use 1.2.5. I tried the MenuManager approach, but I couldnt let it pass the HTML formatting.

The version with MenuManager could be seen here:
http://kekorghu.web.maxer.hu/index.php?page=men-pr-ba

As you can see, all the HTML codes are encoded into special characters, which is good for a lot of reasons but bad for us now.

Could you help me with?
A. a proper way of menu styling and IMG embedding using MenuManager
B. a simple hack for not encoding HTML characters using MenuManager
zsero
Forum Members
Forum Members
Posts: 48
Joined: Mon Feb 13, 2006 4:39 pm

Re: images and styling for each element in menumanager

Post by zsero »

Any idea on that? What do you suggest, modify the menumanager code not to convert HTML entities into encoded characters, or is there some smarter way to do that?

Nobody else wanted to have highlighted menu items for specific pages?
nhaack

Re: images and styling for each element in menumanager

Post by nhaack »

You could go for using {$node->index} in the name off CSS IDs and classes.

Let's say you have something like this in your menu manager (simplified):

Code: Select all

{foreach from=$nodelist item=node}
<div id="menu_item_{$node->index}">
<a href="{$node->alias}.htm">{$node->menutext}</a>
</div>
{/foreach}
And then in your CSS, you have something like:

Code: Select all

div#menu_item_1 { ... }
div#menu_item_2 { ... }
div#menu_item_3 { ... }
With the {$node->index}, you can also build a switch to embed an image e.g.

Code: Select all

{if $node->index == 5}<img../>{/if}
Would that be what you are looking for?

edit:
nice site btw.

But indeed, it is very strange.. I have html in my menu manager template as well and no problems. Can you post your menu template?

edit2:
dough... now I get it. But I see it has been solved here http://forum.cmsmadesimple.org/index.php/topic,27202.new.html#new
Last edited by nhaack on Mon Nov 03, 2008 12:21 am, edited 1 time in total.
zsero
Forum Members
Forum Members
Posts: 48
Joined: Mon Feb 13, 2006 4:39 pm

Re: images and styling for each element in menumanager

Post by zsero »

Thank you for your answer!

Luckily I got a one line solution from Calguy in the other thread, which perfectly solved all my problems!
sara_criss
New Member
New Member
Posts: 8
Joined: Tue Oct 21, 2008 2:05 pm

Re: images and styling for each element in menumanager

Post by sara_criss »

its really helpful answer nhaack it really helps me also ....thanks for increasing my knowledge ...
Post Reply

Return to “Layout and Design (CSS & HTML)”