Zen Follower
- Join Date:
- Jan 2011
- Posts:
- 196
- Plugin Contributions:
- 0
Contact us Page on NavCatTabs
I want the categories, then Contact us page at the end of category tabs at the top. Is that possible to do?
Views: 1,102
Zen Follower
I want the categories, then Contact us page at the end of category tabs at the top. Is that possible to do?
Sensei
Add this to the bottom of the /includes/modules/categories_tabs.php file
(if there's a ?> at the end of the file, put this before it) :
$links_list[] = '<a class="' . $new_style . '" href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a> ';
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Zen Follower
Wow, it works! Thank you!
Zen Follower
One last thing:
So I have 'Contact Us' now on the end of NavCatTabs. However, when I go in there, The link for it at the top does not show as active. For example, all the other category links in NavCatTabs are bold when active, except Contact Us.
Sensei
Add another line of code above that to set $new_class to whatever class you want it to use to denote that it's selected, like this:
if ($current_page_base == FILENAME_CONTACT_US) $new_class = 'category-subs-selected';
```Change the class name to suit however you've customized your site.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Zen Follower
So it will be:
#category-subs-selected { font-weight: bold; }
in CSS to make the word "Contact Us" bold?
Zen Follower
This did not work for me to make it as active:
sle39lvr:
So it will be:
#category-subs-selected { font-weight: bold; }
>
> in CSS to make the word "Contact Us" bold?
Sensei
Try this variation in the PHP code. Shouldn't require any CSS change to make it work, although you can certainly restyle the CSS if you wish to change the appearance:
$span_class = ($current_page_base == 'contact_us') ? 'category-subs-selected' : 'category-subs-unselected';
$links_list[] = '<a class="category-top" href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . '<span class="' . $span_class . '">' . BOX_INFORMATION_CONTACT . '</span></a> ';
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Zen Follower
Works perfectly! Thank you!!
Zen Follower
DrByte:
Try this variation in the PHP code. Shouldn't require any CSS change to make it work, although you can certainly restyle the CSS if you wish to change the appearance:
$span_class = ($current_page_base == 'contact_us') ? 'category-subs-selected' : 'category-subs-unselected';
$links_list[] = '<a class="category-top" href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . '<span class="' . $span_class . '">' . BOX_INFORMATION_CONTACT . '</span></a> ';
Since this worked perfectly for Contact Us, How can I do the same for Home link ?
Tell staff why this post should be reviewed.