Forums / Templates, Stylesheets, Page Layout / 'Home' link on NavCatTabs

'Home' link on NavCatTabs

Views: 952

Results 1 to 7 of 7
20 Oct 2015, 5:50 PM
#1
sle39lvr avatar

sle39lvr

Zen Follower

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

'Home' link on NavCatTabs

I am trying to put home page link ('Home' link) in the top category links (NavCatTabs).

Lastly, when I was asked to put "Contact us" in the same category links, I was told to do this, and it worked:

/includes/modules/categories_tabs.php

$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> ';

How would I change this to work for 'Home' link?

23 Oct 2015, 4:18 PM
#2
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: 'Home' link on NavCatTabs

sle39lvr:

I am trying to put home page link ('Home' link) in the top category links (NavCatTabs).

Lastly, when I was asked to put "Contact us" in the same category links, I was told to do this, and it worked:

/includes/modules/categories_tabs.php

$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> ';

> 
> How would I change this to work for 'Home' link?

If you peek in the includes/templates/template_default/common/tpl_header.php file you will see the code for a home link.  

Thanks,

Anne
24 Oct 2015, 4:41 PM
#3
sle39lvr avatar

sle39lvr

Zen Follower

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

Re: 'Home' link on NavCatTabs

picaflor-azul:

If you peek in the includes/templates/template_default/common/tpl_header.php file you will see the code for a home link.

Thanks,

Anne

Thanks Anne,

I got this from there:

<?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a>

However, How do I have it as highlighted when the home page is loaded?

Above code for contact us contained this to detect that:

$span_class = ($current_page_base == 'contact_us') ? 'category-subs-selected' : 'category-subs-unselected';
24 Oct 2015, 4:47 PM
#4
picaflor_azul avatar

picaflor_azul

Totally Zenned

Join Date:
Jul 2009
Location:
picaflor-azul.com
Posts:
6,940
Plugin Contributions:
28

Re: 'Home' link on NavCatTabs

sle39lvr:

Thanks Anne,

I got this from there:

<?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a>
> 
> However, How do I have it as highlighted when the home page is loaded?
> 
> Above code for contact us contained this to detect that:
> ```
$span_class = ($current_page_base == 'contact_us') ? 'category-subs-selected' : 'category-subs-unselected';

You can try using 'index'

Thanks,

Anne

24 Oct 2015, 4:55 PM
#5
sle39lvr avatar

sle39lvr

Zen Follower

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

Re: 'Home' link on NavCatTabs

$span_class = ($current_page_base == 'index') ? 'category-subs-selected' : 'category-subs-unselected';

Comes up as selected for every page :(

29 Oct 2015, 11:52 PM
#6
sle39lvr avatar

sle39lvr

Zen Follower

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

Re: 'Home' link on NavCatTabs

Tried index, main_page, /, and just empty. Nothing worked :(