Forums / General Questions / where is the code is the categories on the sidebar generated?

where is the code is the categories on the sidebar generated?

Locked

Views: 1,172

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
24 Dec 2007, 1:42 AM
#1
zcnoob avatar

zcnoob

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

where is the code is the categories on the sidebar generated?

Hi,

Where in the source code is the categories on the left side bar generated? (please tell me the file to look at).

24 Dec 2007, 1:53 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: where is the code is the categories on the sidebar generated?

/includes/templates/your_template/sideboxes/tpl_categories.php.

The list of categories to display is generated by /includes/modules/sideboxes/your_template/categories.php.

If you want to modify the output or formatting, you might look at Categories Dressing for ideas, as well as threads in the forum.

24 Dec 2007, 3:33 AM
#3
zcnoob avatar

zcnoob

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

Re: where is the code is the categories on the sidebar generated?

Thanks Glenn!

Ok so now where in the code is this tpl_categories.php being called from?

24 Dec 2007, 3:36 AM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: where is the code is the categories on the sidebar generated?

Before you modify any code - be sure to read the tutorials about creating your custom template overrides.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

24 Dec 2007, 4:33 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: where is the code is the categories on the sidebar generated?

It sounds like you're jumping in headfirst. Before you do a lot of recoding, what are you trying to accomplish? We may be able to guide you to the most efficient/effective methods if we know what you want to do.

And yes - make your own custom template structure before doing any editing of files.

24 Dec 2007, 1:01 PM
#6
zcnoob avatar

zcnoob

New Zenner

Join Date:
Dec 2007
Posts:
4
Plugin Contributions:
0

Re: where is the code is the categories on the sidebar generated?

oh I am just trying to get a feel for how things work.

Specifically with the category display, I want to know how many levels I can display i.e. top category, then sub category and then sub-sub-category all on the sidebar.

I think 2 levels is enough anyhow, or for it to show the top level, then when someone clicks on one of them it displays the subcategories for that level ONLY along with the other top categories.

24 Dec 2007, 3:58 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: where is the code is the categories on the sidebar generated?

Have you made a test installation yet? The installer doesn't really emphasize enough that it is very worthwhile to install the demo products when you begin.

If you have the ability to make a second database, you will benefit from having a second installation in a subfolder that is just for reference, as the demo products all show you how to do various things.

The categories menu does show all top cats and the subcats of the current path; there is no practical limit on subcat depth. There are also mods available to expand the category tree completely all the time, or limit the expansion as desired - anything is possible.