Attached is an example of what I need this mod to do, would it be possible for a step by step post for this, I think it will be very beneficial to new zenners. Thanks!
Printable View
Attached is an example of what I need this mod to do, would it be possible for a step by step post for this, I think it will be very beneficial to new zenners. Thanks!
The easiest and most reliable method will be to add the link as a heading above the desired category. Adding it as subtext below the category will mean that any subcats of that category will appear below the link - probably not what you want.
In /includes/languages/english/extra_definitions/your_template/categories_dressing_defines.php, add a new define like thisChange the link address and text as desired. Note the use of a relative link: this will point toCode:define ('CAT_BOX_HEADING_33','0|0|||<a class="nonCatLink" href="index.php?main_page=page&id=5">Link to EZ-Page 5</a>|4');//link - style 4
http://www.yoursite.com/index.php?main_page=page&id=5
and if you transfer the file to a test/development site, it will point to the new base site automatically.
In /includes/templates/your_template/css/stylesheet_categories_dressing.css, make a new rule in the "individual page" section likeThis essentially replicates the top cat styling for the link.Code:/*individual page rules go after the general rules*/
/*example for custom non-category link styling to match top cats*/
#categories ul a.nonCatLink {
display: list-item;
list-style: disc inside url(../images/bullet1.gif);/*change to list-style: none; to remove bullet*/
background: no-repeat;
border: none;
margin: 0;
padding: 0;
}
If you want to use subtext for the link location, you can start with this:The styling will be a bit trickier because you will have to account for the indent.Code:define ('CAT_BOX_SUBTEXT_33','<a class="nonCatLink" href="yourdestination">A Noncat Link</a>|2');//subtext link - style 2
I'm still having issues with someone logging onto the website, seeing the bullets/discs first, then seeing them be replaced with the arrow images.
Is there any way to get rid of the regular bullet icons completely so that a viewer only sees the arrow image?
:P
i have been playing around with the mod is there a way to have
When click on the category, this subcategory is under the category name, is it possible to have it set to go on the buttom of the subcategories in that list when that category is selected?PHP Code:
define ('CAT_BOX_SUBTEXT_1','Subtext for cat 23 escape apostrophe\'s|1');//subtext - style 1
Also for the above define, is there a way to make 2 of the same to go under the same category? I tried taking
and switching it toPHP Code:
define ('CAT_BOX_SUBTEXT_1','Subtext for cat 23 escape apostrophe\'s|1');//subtext - style 1
then went to stylesheet for this mod:PHP Code:
define ('CAT_BOX_SUBTEXT_1','Subtext for cat 23 escape apostrophe\'s|2');//subtext - style 2
But had zero progressPHP Code:
.catBoxSubtext2 {
font-family: 'times new roman', serif;
font-weight: normal;
font-size: 1.2em;
color: #ff00;
background-color: #ffddff;
padding: 0.1em 0.2em 0.1em 1.0em;
}
Subtext will always directly follow the category it belongs to - there is no way to make it drop below that cat's subcats. That is why I recommended using the heading version and placing it above the following category. If you want a link after the last top category, you can only do it with subtext, though.
To get two or more links in a row, make two headings for the category define statement, likePHP Code:
define ('CAT_BOX_HEADING_33','0|0|||<a class="nonCatLink" href="index.php?main_page=page&id=5">Link to EZ-Page 5</a>|4|<a class="nonCatLink" href="index.php?main_page=page&id=6">Link to EZ-Page 6</a>|4');//two links - style 4
If you need to use subtext and have two links, double up the link code directly:PHP Code:
define ('CAT_BOX_SUBTEXT_33','<a class="nonCatLink" href="index.php?main_page=page&id=5">Link to EZ-Page 5</a><a class="nonCatLink" href="index.php?main_page=page&id=6">Link to EZ-Page 6</a>|2');//two subtext links - style 2
One last thing - a workaround if your last top cat has subcats and you really want links after those: make a new empty category, set its sort order to be after all others, and give it a unique id as described in the comments in tpl_categories.php ("holiday"). Put the links as headings for that, and then in your stylesheet set that id to display: none; so it will not show yet its heading(s) will show.
I got as far as here now I'm lost.
I uncommented out the: in tpl_categories.php
My blank category id is 68, (blank you meant by not putting in the category name through admin correct?)PHP Code:
case ($box_categories_array[$i]['path'] == 'cPath=68'):
$new_style = 'holiday';
break;
Im not sure how and where to put the links as headings what what to display as display: none in style sheet (#categories li.cat-holiday a { <is that it?)
-OR-
If possible I can use the sub text as shown above, and redesign what I had planned for the bar if this: Is it possible to have the subtext (CAT_BOX_SUBTEXT_1) show only on the main page OR only show when that category is not selected?...
All I am trying to do is get a link under the category, I tried in previous post, but for some reason when I change example: define ('CAT_BOX_HEADING_53','0|2||') change 53 to 3 (to match categoryid (define ('CAT_BOX_HEADING_3','0|2||'))
they dont show.
By "empty" I meant with no products. You can give it a name; that doesn't matter. If the id is 68 (and it is a top category which it should be), do the links as headings for that:To hide the dummy category if you have given it a new_style of holiday:PHP Code:
define ('CAT_BOX_HEADING_68','0|0|||<a class="nonCatLink" href="index.php?main_page=page&id=5">Link to EZ-Page 5</a>|4|<a class="nonCatLink" href="index.php?main_page=page&id=6">Link to EZ-Page 6</a>|4');//two links - style 4
Code:#categories li.cat-holiday a {display: none;}
Got it to work but the define isn't working I entered it the same as you had me, I am not sure why, but its the same when I try to change other defines. What I did in the beginign Installed a fresh zen-cart store. It had a bunch of categories stock (installed through cpanel in my hosting company) I installed the Category Dressing Mod, then I had all the headings appears, removed the categories through zen store admin, and renamed the ones I kept to match my live store, ever since then when I try to change the the categorie id in category_dressing_define it doesn't work the only one that works is the sub_text