Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Diff Templates on Category and Detailed Page?

Quote Reply
Diff Templates on Category and Detailed Page?
Howdie,

I am currently using a different Category.html template for one of my categories. I'd love to extend it to my Detailed pages, too, but I don't want to have a whole nuther template set to have to manage. Is it at all possible, or likely that instead of adding a whole new template set, I can instead create a new template directory and only put the templates that are different from the default template set in there. Then, I'd go to Browse->Category->Edit->Category Template and then put the name of the new template set there. Then LSQL would only pull the relevantly changed templates, unless I had put a WHOLE new set in there, in which case, it would show the entire set.

Is this kind of thing possible? Would it ever be integrated into LSQL if it is not currently possible? Would there be a plugin that could allow this?

Would alieviate alot of headaches in managing a larger site with different templates going on...

Thanks!
Evie
Quote Reply
Re: [Evoir] Diff Templates on Category and Detailed Page? In reply to
nothin?
Quote Reply
Re: [Evoir] Diff Templates on Category and Detailed Page? In reply to
Well, Mel helped me and came up with a really great solution.

What this does is allow you to have different template sets, but not have to use complete sets, so it makes updates easier.

What you can do is in the new template directory, you would put a
file called:
.tplinfo
and then in that file put:
{
inheritance => '../default'
}

Then what will happen is if it can't find the file in the category template
directory it will look in the default directory (or you can define which directory it pulls from by changing the word "default") . This .tplinfo file will not be editable form the template editor. You will need to create it and ftp it up to the directory.

Works like a charm.

So, if you ONLY want to replace the category and detailed templates, but everything else is the same as the rest of the site, just use this method. Create a new directory, put the new category and detailed templates in there, put this .tplinfo file in there, and you are all set. :)