#categories li a.cat-selected-text but for EZPAGES
hello...
im just playing.. but is there a way to make the selected link for an EZpage link bold like how you can a selected category link.
for example, i use the following for category links
#categories li a.cat-selected-text {
color:#990000;
font-weight:bold;
padding-left: 0.5em;
}
can CSS be used to do the same for links in the EZpages top bar thing, so when a person is looking at that ezpage, the top bar link remains bold or a diff colour etc... if so, how, cos i havent worked it out... :(
Cheers
M
Re: #categories li a.cat-selected-text but for EZPAGES
I've been trying to do that for the EZ Page and other links (Information, etc.) by adapting the code from the Categories box, but have failed so far. It would be a very popular mod, I think.
Re: #categories li a.cat-selected-text but for EZPAGES
haha.. no wonder i couldnt get it to work then.. my PHP knowledge is less than my understanding of women... and i will never understand them!
We need a ZC rock n roll star who could create something and name it... oh... EZPage Dressing ;-)
LOL... Glenn Herbert, was that a good enough shamless hint?
Re: #categories li a.cat-selected-text but for EZPAGES
Sure, it would be possible. The $current_page_base and $_GET['id'] when on an ez-page will allow you to identify if one is active. This can be done in /includes/templates/your_template/templates/tpl_ezpages_bar_header.php, and the link can then be given an "active" classname to style as desired.
Re: #categories li a.cat-selected-text but for EZPAGES
Here you go:
/includes/templates/your_template/templates/tpl_ezpages_bar_header.php
PHP Code:
<?php
/**
* Page Template
*
* Displays EZ-Pages Header-Bar content.<br />
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_ezpages_bar_header.php 3377 2006-04-05 04:43:11Z ajeh $
* Modified for Ezpages Active Header by Glenn Herbert (gjh42) 2010-06-15
*/
/**
* require code to show EZ-Pages list
*/
include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));
?>
<?php if (sizeof($var_linksList) >= 1) { ?>
<div id="navEZPagesTop">
<?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) {
$active = ($current_page_base == 'page' and $_GET['id'] == $var_linksList[$i]['id'])? ' class="activeEZPage"': '';
?>
<a href="<?php echo $var_linksList[$i]['link']; ?>"<?php echo $active; ?>><?php echo $var_linksList[$i]['name']; ?></a><?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?>
<?php } // end FOR loop ?>
</div>
<?php } ?>
Style .activeEZPage {} as desired.
Note: I haven't tested this yet, so please let me know if anything needs fixing.
I'll package it up into a proper mod after the festival I'm hosting in two weeks... I'm a bit busy right now:)
Re: #categories li a.cat-selected-text but for EZPAGES
Re: #categories li a.cat-selected-text but for EZPAGES
one tiny thing, if you have the time... how can i style internal links in the EZpage top bar? for example: index.php?main_page=reviews or index.php?main_page=index&cPath=1 etc
It works great for pages where the content is created in the EZpage editor bit... but no effect on pages that are internally linked... if you get me?
Re: #categories li a.cat-selected-text but for EZPAGES
Right - the ez-pages header can show links to non-ez-pages... that will take a bunch more identification coding... like ten times as much or so:)
I'll have to look into this when I have more time. There may be an elegant method of doing it, let's hope so anyway.
Re: #categories li a.cat-selected-text but for EZPAGES
Hi Glenn, when ever you can fit it in is great. Im just pleased it can be done!
I was just playing about with CSS (killing time) and i had the thought of the ezpages effect like how category dressing can style selected links.
hope your festival goes well!! thanks for mod!
Quote:
Originally Posted by
gjh42
Right - the ez-pages header can show links to non-ez-pages... that will take a bunch more identification coding... like ten times as much or so:)
I'll have to look into this when I have more time. There may be an elegant method of doing it, let's hope so anyway.
Re: #categories li a.cat-selected-text but for EZPAGES
Hello Glenn.
How was your festival ?
Did you ever get a chance to look over this idea?
Any joy? Or would it take far too much changing of loads and loads of files etc?
Cheers
M