Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default '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
    Code:
    $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?
    Last edited by sle39lvr; 20 Oct 2015 at 06:53 PM.

  2. #2
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: 'Home' link on NavCatTabs

    Quote Originally Posted by sle39lvr View Post
    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
    Code:
    $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

  3. #3
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: 'Home' link on NavCatTabs

    Quote Originally Posted by picaflor-azul View Post
    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:
    Code:
    <?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:
    Code:
    $span_class = ($current_page_base == 'contact_us') ? 'category-subs-selected' : 'category-subs-unselected';

  4. #4
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,930
    Plugin Contributions
    45

    Default Re: 'Home' link on NavCatTabs

    Quote Originally Posted by sle39lvr View Post
    Thanks Anne,

    I got this from there:
    Code:
    <?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:
    Code:
    $span_class = ($current_page_base == 'contact_us') ? 'category-subs-selected' : 'category-subs-unselected';
    You can try using 'index'



    Thanks,

    Anne

  5. #5
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: 'Home' link on NavCatTabs

    Code:
    $span_class = ($current_page_base == 'index') ? 'category-subs-selected' : 'category-subs-unselected';
    Comes up as selected for every page

  6. #6
    Join Date
    Jan 2011
    Posts
    196
    Plugin Contributions
    0

    Default Re: 'Home' link on NavCatTabs

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

  7. #7
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: 'Home' link on NavCatTabs

    try
    PHP Code:
    $this_is_home_page 

 

 

Similar Threads

  1. Add link to navcattabs bar
    By matchlock in forum Templates, Stylesheets, Page Layout
    Replies: 15
    Last Post: 29 Jun 2011, 06:58 AM
  2. Home link links to default home page
    By roekoe in forum Addon Language Packs
    Replies: 0
    Last Post: 9 May 2011, 12:44 PM
  3. Another request for a home page link to my real home page
    By thesoundsmith in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 19 Jun 2008, 09:46 PM
  4. HELP The home link will not goto home
    By fuzzyevolution in forum Templates, Stylesheets, Page Layout
    Replies: 21
    Last Post: 12 May 2008, 01:15 AM
  5. Home link and logo link to two diferent places?
    By ehm in forum General Questions
    Replies: 0
    Last Post: 22 Apr 2008, 10:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR