Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Is there a limit to number of templates?

Quote Reply
Is there a limit to number of templates?
There are some specific unique modifications I need to do on each category page. The only solution I can see is to create a template for each category. Is there a limit on number of templates I can create? Are there any other downsides to this kind of setup? At this point there are around 1,000 categories in the directory.
Quote Reply
Re: [Z] Is there a limit to number of templates? In reply to
Mmm, I'd try and avoid that. What sort of modifications are you trying to do? I would try and do stuff more like:

Code:
<%if Full_Name istart "Root Category Name/"%>
... show modification for all sub-categories in "Root Category Name"
<%elsif Full_Name istart "Another Name/"%>
some more stuff to show, this time in "Another Name" sub-categories
<%endif%>

I just finished a job where he had over 20 different category.html templates - and trust me, it was a SOD to do any updates Wink

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Is there a limit to number of templates? In reply to
I need to have a set of different tags like canonical tags, header tags, meta description, Facebook opnen graph tags, title tags, that would be different for each category.
Quote Reply
Re: [Z] Is there a limit to number of templates? In reply to
Why not add a new field in the category table, called "Category_Specifics" (TEXT type, then TEXTAREA field) ... and then in your template you could use:

<%Category_Specifics%>

,...to load those values into the template. You can do the same for other parts of the category page too

Should be much easier than having thundreds/thousands of templates ;)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Is there a limit to number of templates? In reply to
Where is a category table? Not sure how specificly do (TEXT type, then TEXTAREA field).
Can you give me a specific example.Let's say I want to add canonical tag <link rel="canonical" href="http://www.example.com/specific_category/" /> to each category page. How would I do that?
Quote Reply
Re: [Z] Is there a limit to number of templates? In reply to
Database > Category > Properties > Add Field (bottom of page)

For that canonical one, you could add:

Field name: category_canonical
Type: CHAR
Size: 255

Field name: Category Canonical
Field type: TEXT

...then submit that page. You then will have that option in your add/modify category pages.

To use that field in the template, you could use:

Code:
<%if category_canonical%>
<link rel="canonical" href="<%category_canonical%>" />
<%endif%>

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Is there a limit to number of templates? In reply to
Thanks Andy. I'll give it a try later today.
If I can do all the tags this way that would save a lot of time. :)
Quote Reply
Re: [Z] Is there a limit to number of templates? In reply to
Yup - sure would. Whenever possible, try not to have too many category.html templates (unless of course the different "root" categories need a TOTALLY different design, in which case its fine) ... but if its only tags/small bits of HTML - then it makes it much easier for you to use database fields to do the hard work :)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Is there a limit to number of templates? In reply to
When I go to Database > Category > Properties > in the left top Editor window I select Category in the first field, properties in the second, and the third field says "id".
If I click on "Go" it brings me to Category:Table Editor. At the bottom there is "Add" optoin but this is for adding category, not field.
Seems like I need more help here. :)
Quote Reply
Re: [Z] Is there a limit to number of templates? In reply to
Check the line below the one that has:

Add | Modify | Delete ... etc

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Is there a limit to number of templates? In reply to
That worked great! Smile I'm impressed!


Is your wish list still actual?
If it is, once I'm done with this project in a few weeks I'll buy you something from the list as a thank you gift.
Do you have a favorite item on that list?
Quote Reply
Re: [Z] Is there a limit to number of templates? In reply to
Hi,

Cool Smile

Quote:
Is your wish list still actual?
If it is, once I'm done with this project in a few weeks I'll buy you something from the list as a thank you gift.
Do you have a favorite item on that list?

Yup :) Can't say there is anything particular that I want more than the others - but any gift is appreciated Angelic

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates