PDA

View Full Version : How create new .tpl file?


Romario
09-06-2005, 08:02 PM
How create new .tpl for subcategories.
(example: main.tpl only for index.php and subcat.tpl for all subcats pages)

vkaryl
09-07-2005, 03:23 AM
Well, the .tpl files are just html files with the .tpl extension to begin with. So you'll need to set up a new file in your html editor, save it as subcat.tpl (copy the header info from one of the other .tpl files).

Then you'll need to sort out the part of the main.tpl file you want to move, which would be the section calling the subcats. Once that's done, you'll have to include your new subcat.tpl file in main.tpl the way the other includes are handled.

You'll just have to test the setup, to make sure you have the if statements right and so on....

Romario
09-07-2005, 08:27 AM
It not that is necessary for me.

I need show 1 category column on index.php and show 2 colums all subcategories pages.

Romario
09-16-2005, 11:58 PM
Please tell me, how create new template file for subcategories pages if it's possible. If it's impossible tell me also.

David
09-17-2005, 02:34 AM
You will need to use an {if} statement in smarty that basically says "if this is a subcategory (parent not equal to zero), display this way". I'm not good enough at smarty to give the full answer, but maybe this will get you going in the right direction.

brake499
09-24-2005, 01:08 PM
Content visible to registered users only.

Its okay, but not perfect maybe needs a bit more work.