Forums / Templates, Stylesheets, Page Layout / Contact us Page on NavCatTabs

Contact us Page on NavCatTabs

Views: 1,102

Results 1 to 10 of 10
24 Aug 2013, 2:34 AM
#1
sle39lvr avatar

sle39lvr

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?

24 Aug 2013, 3:43 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Contact us Page on NavCatTabs

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.

24 Aug 2013, 4:54 AM
#3
sle39lvr avatar

sle39lvr

Zen Follower

Join Date:
Jan 2011
Posts:
196
Plugin Contributions:
0

Re: Contact us Page on NavCatTabs

Wow, it works! Thank you!

25 Aug 2013, 4:12 PM
#4
sle39lvr avatar

sle39lvr

Zen Follower

Join Date:
Jan 2011
Posts:
196
Plugin Contributions:
0

Re: Contact us Page on NavCatTabs

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.

25 Aug 2013, 5:41 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Contact us Page on NavCatTabs

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.

25 Aug 2013, 10:16 PM
#6
sle39lvr avatar

sle39lvr

Zen Follower

Join Date:
Jan 2011
Posts:
196
Plugin Contributions:
0

Re: Contact us Page on NavCatTabs

So it will be:

#category-subs-selected { font-weight: bold; }

in CSS to make the word "Contact Us" bold?

30 Aug 2013, 12:23 AM
#7
sle39lvr avatar

sle39lvr

Zen Follower

Join Date:
Jan 2011
Posts:
196
Plugin Contributions:
0

Re: Contact us Page on NavCatTabs

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?
30 Aug 2013, 4:13 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Contact us Page on NavCatTabs

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.

31 Aug 2013, 5:11 AM
#9
sle39lvr avatar

sle39lvr

Zen Follower

Join Date:
Jan 2011
Posts:
196
Plugin Contributions:
0

Re: Contact us Page on NavCatTabs

Works perfectly! Thank you!!

13 Oct 2015, 2:50 AM
#10
sle39lvr avatar

sle39lvr

Zen Follower

Join Date:
Jan 2011
Posts:
196
Plugin Contributions:
0

Re: Contact us Page on NavCatTabs

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 ?