Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding a simple link to the categories sidebox

Adding a simple link to the categories sidebox

Views: 852

Results 1 to 6 of 6
18 Oct 2012, 8:56 PM
#1
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Adding a simple link to the categories sidebox

Hello,

I would like to add a link in the categories sidebox just below the line that separates the categories from "New Product". The link will read "Special Orders" and link to this page http://d****med.com/index.php?main_page=page&id=6

Can anyone help me with what and where? Greatly appreciated!

19 Oct 2012, 10:17 PM
#2
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Adding a simple link to the categories sidebox

I've been searching around and although I can find some similar posts, nothing that is explaining what I need to do. At least not that I understand.... Anyone?

19 Oct 2012, 11:36 PM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding a simple link to the categories sidebox

someone else may suggest a better ay but this works

copy
/includes/templates/template_default/sideboxes/tpl_categories.php

to
/includes/templates/YOUR_TEMPLATE/sideboxes/tpl_categories.php

then find:

    if (SHOW_CATEGORIES_SEPARATOR_LINK == '1') {
      $content .= '<hr id="catBoxDivider" />' . "\n";
    }

right after that add:

        $content .= '<a href="' . zen_href_link(FILENAME_LOGIN) . '">' . CATEGORIES_BOX_MYLINK . '</a>' . '<br />' . "\n";

changing FILENAME_LOGIN to where ever you want the url togo

then create a file here, called:
/includes/languages/english/extra_definitions/YOUR_TEMPLATE/categories_sidebox_extra_defines.php

put your defines in here like so:

<?php
define ('CATEGORIES_BOX_MYLINK','Login / Register');
?>

In the above example I added the login page below the categories <hr /> or line that seperates the categories from "New Products"

Hope this helps!

20 Oct 2012, 1:28 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Adding a simple link to the categories sidebox

That will work fine. Alternatively, Categories Dressing fom Plugins will allow you to add a "heading" above New Products which can be defined as a link to wherever you like.

20 Oct 2012, 1:41 AM
#5
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Adding a simple link to the categories sidebox

very true and a great mod :-)

22 Oct 2012, 10:53 PM
#6
doooomed avatar

doooomed

Zen Follower

Join Date:
Jun 2009
Posts:
275
Plugin Contributions:
0

Re: Adding a simple link to the categories sidebox

Awesome, Thanks guys!