Re: Ezpages Improved Menus support
Trying to install this now and I want to use .png files instead of .gif.
I am trying to edit 'image_titles_defines' but the file is blank...
Any ideas?
EDIT: Apparently, the older download link contains a blank file and the newer one has one with code!
I'll be on my way now, thanks!
Re: Ezpages Improved Menus support
Hello again,
It works perfectly, thanks-a-million!
Just for the sake of other slow people, like me... The 'ez-page id' is a number (the number '2' in my case) and NOT the title of the link such as 'Product Catalogs' or something.
Other addons have you name the image whatever the text for the link is, but this one is much easier. My image is named 'ezpside2.png' instead of 'ezpsideProduct_Catalogs.png'
Thanks again!
Re: Ezpages Improved Menus support
[FONT=Verdana]Glenn,
Again, love the flexibility, got one question. Any easy way to add the [/FONT][FONT=Verdana]onmouseover event to images?
[/FONT]
Re: Ezpages Improved Menus support
Perhaps if you knew javascript there would be:)
If you want the same change to happen to all links on hover (not an individual image being swapped), you could make the image partly transparent and apply CSS to give it a border, background, etc. that can change on hover or visited states. It would take a relatively minor code change to give each link an id so that it can be addressed individually in the stylesheet and be fully CSS-manageable.
Re: Ezpages Improved Menus support
Looks like I will try to add an id to each link, I like being able to have 100% control via the stylesheet.
Re: Ezpages Improved Menus support
In tpl_ezpages_bar_header.php, add after the <a
id="ezpagesTopLink' . $var_linksList[$i]['id'] . '
to this line
PHP Code:
echo '<li><a href="' . $var_linksList[$i]['link'] . '"' . active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']) . '>' . text_image_sub($var_linksList[$i]['name'], 'ezphead' . $var_linksList[$i]['id']/*, '', EZPAGES_TOP_ICONS*/) . '</a>' . (($i < $n and EZPAGES_SEPARATOR_HEADER)? '<span class="separator">' . EZPAGES_SEPARATOR_HEADER . '</span>' : '') . '</li>' . "\n";
to get
PHP Code:
echo '<li><a id="ezpagesTopLink' . $var_linksList[$i]['id'] . ' href="' . $var_linksList[$i]['link'] . '"' . active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']) . '>' . text_image_sub($var_linksList[$i]['name'], 'ezphead' . $var_linksList[$i]['id']/*, '', EZPAGES_TOP_ICONS*/) . '</a>' . (($i < $n and EZPAGES_SEPARATOR_HEADER)? '<span class="separator">' . EZPAGES_SEPARATOR_HEADER . '</span>' : '') . '</li>' . "\n";
Re: Ezpages Improved Menus support
Correction to use the current file version instead of the new unreleased version:
In tpl_ezpages_bar_header.php, add before the ' . active_page_class(
id="ezpagesTopLink' . $var_linksList[$i]['id'] . '"'
to this line
PHP Code:
echo '<li><a href="' . $var_linksList[$i]['link'] . '"' . active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']) . '>' . title_image_exists($var_linksList[$i]['name'], 'ezphead' . $var_linksList[$i]['id']) . '</a>' . (($i < $n and EZPAGES_SEPARATOR_HEADER)? '<span class="separator">' . EZPAGES_SEPARATOR_HEADER . '</span>' : '') . '</li>' . "\n";
to get
PHP Code:
echo '<li><a href="' . $var_linksList[$i]['link'] . '" id="ezpagesTopLink' . $var_linksList[$i]['id'] . '"' . active_page_class($var_linksList[$i]['id'],$var_linksList[$i]['altURL']) . '>' . title_image_exists($var_linksList[$i]['name'], 'ezphead' . $var_linksList[$i]['id']) . '</a>' . (($i < $n and EZPAGES_SEPARATOR_HEADER)? '<span class="separator">' . EZPAGES_SEPARATOR_HEADER . '</span>' : '') . '</li>' . "\n";
I will add this as an additional enhancement to an improvement I recently made in the features.
Re: Ezpages Improved Menus support
The feature improvement I mentioned is discussed in this thread, for those who are interested.
It allows an image to be added before or after the text rather than simply substituted for the text, if desired. This can be used for icons. The link id feature described above would also allow for this kind of icon to be added as a background, so there are multiple possibilities. I would appreciate feedback on which ones people find most useful and easiest.
Re: Ezpages Improved Menus support
Awesome, great work & mod as always! :smile:
I used the link id feature, very easy and flexible. I made all my changes via CSS.
And simply adjusting padding allowed me to include an icon to the background image before text, after text & both before and after.
In my opinion the link id feature would work for both situations!
Thanks again Glenn!
Only tested in FF and still a template in progress but you can see in action here.
Home link has an icon before text & Review link has an icon after text.
Re: Ezpages Improved Menus support
Thanks for posting the example! That's a nice use of the hover and current page highlighting, as well as the icons.
The background location for icons is more flexible (before or after text at will, as opposed to a global setting for before or after). On the other hand, its flexibility means that every link may need to be individually fine-tuned instead of letting the foreground images automatically make the space they need...