View Full Version : Categories - Subcategories
sdawkins
07-16-2006, 01:04 PM
Is there a way to put subcategories in a box. Not on the main page, but once you click a category then inside there are sub-categories.....
This is the example
http://www.indexscript.com/cat/7/
redeye
07-16-2006, 01:35 PM
If you don't put any links in your main category you will achieve what you're looking for.
I have an Accessories category with links and sub-cats. If I removed all the links out of the Accessories cat and placed them in the sub-cats then when you clicked on the Accessories category all you would see would be the sub-cats.
sdawkins
07-16-2006, 01:45 PM
Sorry, what I mean to say is -- see example http://www.indexscript.com/cat/7/.
See how the sub-categories are in a box. Then below would be the links. That is the setup I would like to try.
redeye
07-16-2006, 02:03 PM
You mean like this?
http://www.bikerlinx.info/accessories/
sdawkins
07-16-2006, 02:06 PM
Yes, but I do not want the main page to have the box around it.
redeye
07-16-2006, 02:07 PM
do you mean the outer page border?
sdawkins
07-16-2006, 02:13 PM
This is my setup http://www.findtoplinks.com. I do not want the categories on the main page with a border/box around it.
But when you click on one of the cats I would like to have the cats with a border around it (and background color).
Your example of the subcats is perfect, but on your main page you also have the categories in the box. Hard to explain, sorry. I imagine I would have to have both main page cats and the subcat pages in the box....
Sai_dallas
07-16-2006, 02:22 PM
You can use unique Template for the main page.
And modify the page as you like and the rest of the pages use the default template.
So your main page will be different from the rest of the pages.
You can use a different page look for each category if you like.
Just takes too much time.
sdawkins
07-16-2006, 02:28 PM
Sai -- how would I accomplish this?
Sai_dallas
07-16-2006, 03:35 PM
I am no expert - just see if we can make it together.
1) Go to Admin
2) Browse -- > on the very right you see "Unique"
When you set you will see this message
"Category will use unique template. Please create index0.tpl in templates directory."
it by defult use index0.tpl (0 may keep going up as you use more and more categories to use unique templates)
You can just copy and make a new copy of index.tpl as index0.tpl (you still need a copy of index.tpl) so just do not re-name.
And for the main page you can edit your index0.tpl and that sould do it.
if you want you can me the same for the other categories as well
you may have to get index1.tpl etc
Try and let us know
NOTE: I never did this before..
This should be easy...
Try to create extra style in the CSS file and name it "div.box2", something like this:div.box2
{
clear: both;
margin: 10px 5px 0px 5px;
border: 1px solid #999999;
}
In other words make it the way you want it to apear on other pages except index
Now in index.tpl file find code:{if $categories}
<div class="box">
<div class="box-caption-right">
<div class="box-caption-left">
<div class="box-caption">{$lang.categories}</div>
</div>
</div>
{$categories}
</div>
{/if}
Replace it with code:{if $categories}
{if $category.id eq 0}<div class="box">{else}<div class="box2">{/if}
<div class="box-caption-right">
<div class="box-caption-left">
<div class="box-caption">{$lang.categories}</div>
</div>
</div>
{$categories}
</div>
{/if}
Make sure to back up files before making any changes!
Let me know if it's working
sdawkins
07-16-2006, 06:54 PM
WTM -- You ROCK!
Check it out -- (please excuse the appearance of the page I am working on it)
main page http://www.topsportsdirectory.com
the with the above http://www.topsportsdirectory.com/baseball/
You just need to create bullet images with darker background for your category pages :D
sdawkins
07-16-2006, 07:09 PM
I'm not using that template........but thanks...maybe i will just tweak it :) This is part of my problem, never finishing anything. Been working on getting categories and links into it...
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.