Making current page display in bold letters
If I view one of the category pages, that page title appears in bold in the category sidebox.
Can anyone tell me the lines of code in includes/templates/template_default/sideboxes/tpl_categories.php
that make this happen.
If I can find this code I can then replicate it in the More Information sidebox, so that the current page being viewed is displayed as bold in the list.
Many Thanks
Tog
Re: Making current page display in bold letters
It's done by the css
Code:
SPAN.category-subs-parent {
font-weight: bold;
}
Re: Making current page display in bold letters
Thanks David,
Unfortunately that makes things a bit more difficult for me as I cannot see the same piece of code for the More Information box. I tried adding
SPAN.More_information-subs-parent {
font-weight: bold;
}
But this did nothing, so I must need to add some code elsewhere too.
Best wishes
Tog
Re: Making current page display in bold letters
Hi Tog
To achieve what you want I think you would need to add some code to /includes/modules/sideboxes/information.php.
First copy this file to /includes/modules/sideboxes/YOUR_TEMPLATE/information.php
Then add the required code. For each of the links you need to check the variable $current_page:
eg for contact us page change existing code
Code:
if (DEFINE_CONTACT_US_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a>';
}
to
Code:
if (DEFINE_CONTACT_US_STATUS <= 1) {
$information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '"'.($current_page=='contact_us' ? ' class="infobold" : '').'>' . BOX_INFORMATION_CONTACT . '</a>';
}
then in your css add
Code:
.infobold {font-weight:bold}
I haven't tested it - but that should get you started :)
Regards
Re: Making current page display in bold letters
Thanks David
Yes, that is the code that needs changing. Unfortunately your suggestion has an error somewhere, but I can't find it. If I use it as is I get the rest of the code on that page greyed out (Using Ultra Edit), and when the site is accessed everything after the information box has disappeared.
I think it is a syntax problem within the code in red above, but cannot see what the problem is. I have tried removing ' and substituting " in a couple of places but that does not help. I will play around some more with it as I am sure the answer is very close now.
Best wishes
Tog
Re: Making current page display in bold letters
Hi - think I see the problem
Code:
if (DEFINE_CONTACT_US_STATUS <= 1) { $information[] = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '"'.($current_page=='contact_us' ? ' class="infobold"' : '').'>' . BOX_INFORMATION_CONTACT . '</a>'; }
see the missing ' (in blue)
Regards
Re: Making current page display in bold letters
That's it David,
Thank you so much for your help. I have just added your Google Recaptcha plug in too, so that is a double thank you :-)
Best wishes
Tog
Re: Making current page display in bold letters
Glad it works now
Regards