2013-06-14, 20:02:07
In order to use some 'sliding door' menu features, it is necessary to have an additional html tag surrounding the text of a menu entry (see: two examples at the references below).
This is easily achievable with I18N, with a minor change to the code that renders the menu. There is no impact (as far as I can see) on menus where no sliding door effect is required, so there is no disadvantage or limitation if this change is 'always on'. In fact, it may allow more customisation of menu rendering in other cases, too.
Changes required are to the file i18n_navigation/frontend.class.php, lines 298 and 300 (in I18N version 3.2.2).
Existing lines 298-300:
(Line 300 has been manually wrapped for forum display purposes.)
Enhanced lines 298-300:
The $title and $text are wrapped with <span> ... </span> tags to allow the sliding door graphics to be positioned correctly.
References:
Sliding Door using single image (uses <span> tags)
Glossy Horizontal Menu (uses <b> tags, which can be changed in the css for <span>)
This is easily achievable with I18N, with a minor change to the code that renders the menu. There is no impact (as far as I can see) on menus where no sliding door effect is required, so there is no disadvantage or limitation if this change is 'always on'. In fact, it may allow more customisation of menu rendering in other cases, too.
Changes required are to the file i18n_navigation/frontend.class.php, lines 298 and 300 (in I18N version 3.2.2).
Existing lines 298-300:
PHP Code:
$html .= '<li class="' . $classes . '"><a href="' . $href . '" >' . $title . '</a>';
} else {
$html .= '<li class="' . $classes . '"><a href="' . $href . '" title="' .
htmlspecialchars(html_entity_decode($title, ENT_QUOTES, 'UTF-8')) . '
">' . $text . '</a>';
Enhanced lines 298-300:
PHP Code:
$html .= '<li class="' . $classes . '"><a href="' . $href . '" ><span>' . $title . '</span></a>';
} else {
$html .= '<li class="' . $classes . '"><a href="' . $href . '" title="' .
htmlspecialchars(html_entity_decode($title, ENT_QUOTES, 'UTF-8')) . '
"><span>' . $text . '</span></a>';
The $title and $text are wrapped with <span> ... </span> tags to allow the sliding door graphics to be positioned correctly.
References:
Sliding Door using single image (uses <span> tags)
Glossy Horizontal Menu (uses <b> tags, which can be changed in the css for <span>)
--
Nick.
Nick.