Page 1 of 1

text embellisher rollovers

Posted: Thu Aug 07, 2008 1:57 pm
by barry cooper
Hi,

I have used text embellisher to create graphics in menu by
changing menu manager template code (simple_navigation.tpl) from

{$node->menutext}

to

{cms_module module="TruetypeText" style="menu-cccccc" text=$node->menutext}

with a different style for each colour.

Can I make this perform a rollover? 

site: http://79.170.40.182/securinet.net/

I have been asked to take a standard HTML site and create a CMS.

Thanks for your help

Barry

Re: text embellisher rollovers

Posted: Fri Nov 07, 2008 4:33 am
by dinot
Hi, did you manage to get the rollovers working? If so, care to share how you did it? :)

Re: text embellisher rollovers

Posted: Fri Nov 14, 2008 9:11 am
by barry cooper
I have almost solved this problem.

Install the Text Embellisher module.
Load fonts etc

You then need to modify the minimal_menu.tpl in the Menu Manager using the smarty tag from Text Embellisher. I have marked the changes below in Bold.
This show current page in one color and all other in a second color.  But does not rollover.  To make it rollover I think will need another {elseif} statement but my PHP is rubbish...

I hope this helps

Barry


{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}

{if $node->current == true}
url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {cms_module module="TruetypeText" style="menu-666666" text=$node->menutext}

{elseif $node->parent == true && $node->depth == 1}
url}" class="activeparent"{if $node->target ne ""} {$node->menutext}

{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}


{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}> {cms_module module="TruetypeText" style="menu-cccccc" text=$node->menutext}

{/if}

{/foreach}

{repeat string="" times=$node->depth-1}

{/if}

Re: text embellisher rollovers

Posted: Fri Nov 14, 2008 6:06 pm
by dinot
I've played with it a bit a while ago, but I gave up as it wasn't critical.

Rollovers rely on javascript. So what needs to happen when accessing a page is to output a list of all images for the javascript mouseover menu items (using the foreach loop in simple_navigation.tpl). 

For example this should be the output as part of the mouseover javascript:

Code: Select all

     button1.src = 'modules/TruetypeText/cache/d5acd7449863905bedfb830.png'
     button2.src = 'modules/TruetypeText/cache/b4ce8a88471765fb959138.png'
After that you need to add the javascript mouseover code to the image links. That's where I stopped. This requires modification of a file in the module.

There might be an easier way of doing it.