Webmastersite.net
Register Log In

Need help
using a diffrent template for perticular category

Comments on Need help

trraju
Member

Usergroup: Customer
Joined: May 08, 2004

Total Topics: 10
Total Comments: 25
trraju
Posted Aug 07, 2005 - 5:14 AM:

hello

i have many categories for my site and i just wanted to use a diffrent main.tpl for a perticular category , is it possible ?

using different wrapper is possible i know because you have that option to change it when you add the category.

I have tried adding a complete default template with other name and changed the main.tpl and tried adding the template name to the category but i failed, It gave some error, something like this when i have added it locally.

Warning: fopen("templates/default/my", "rb") - Permission denied in c:\apache\htdocs\wsnlinks\filefunctions.php on line 338

Warning: Supplied argument is not a valid File-Handle resource in c:\apache\htdocs\wsnlinks\filefunctions.php on line 341

Please help me in this.

warm regards
trraju
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 07, 2005 - 5:37 PM:

First, main.tpl is not a category template. It's the main index template. So, a custom main.tpl for a category is nonsensical since categories don't use main.tpl.

To give a category a custom template or custom wrapper, click 'edit' by the category.

Warning: fopen("templates/default/my", "rb")


This states that there is no file named 'my'... which would be an odd name for a file anyhow, and can't be a template since a template would be a .tpl. Also a custom templace would normally be in the 'custom' subdirectory.
trraju
Member

Usergroup: Customer
Joined: May 08, 2004

Total Topics: 10
Total Comments: 25
trraju
Posted Aug 08, 2005 - 12:35 AM:

well i can understand that its non sensical but here if i want to change the way category looks i have to change main.tpl right ?

wrapper changes only header and footer right ?

ok let me be more specific :

visit hostonary.com there on main page you have 4 main categories and you have many subcategories for those 4 main categories.

Now i only want to change the way the subcategories looks inside the "host country wise" main categories.
Yes i can chage the displaylinks.tpl but it will change the look of all sub category page however i want to change the view of subcategory only in "host country wise".

I am confused here.. which file to edit and what i need to do ?

regards
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 08, 2005 - 2:25 PM:

To repeat myself: main.tpl is the template for the main index page. It has nothing to do with the category template, which is displaylinks.tpl.

Also repeating, so set a custom template for a category to be used in place of displaylinks.tpl, click the 'edit' button next to the category.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 08, 2005 - 2:26 PM:

To repeat myself: main.tpl is the template for the main index page. It has nothing to do with the category template, which is displaylinks.tpl.

Also repeating, so set a custom template for a category to be used in place of displaylinks.tpl, click the 'edit' button next to the category. An example of what you might type there is custom/wsnlinks.tpl
trraju
Member

Usergroup: Customer
Joined: May 08, 2004

Total Topics: 10
Total Comments: 25
trraju
Posted Aug 13, 2005 - 11:50 PM:

thanks ... well i am bit stupid in understanding the codes wink

let me try and check if it solves my problem.

regards
trraju
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.