Actually, it might be possible to expand the "category.html" idea, to be a template set.
A few changes in the core links logic would have to be made, but basically it would follow the same idea:
use default template set
load current category
if current category has overriding template set, use that
if no overriding template, check parent. [loop until 'root']
use most currently selected set
If you have deep categories, this has a performance penalty.
To improve performance, one of two things could be done. A separate "templates" table could be maintained, such that only one lookup was done for each category, but this look up was done each and every time, so you loose the "speed" of having the default template in the Category record itself (but you have a spiffy little editor to quickly update the template sets for the category table, so it might be a good trade off), _or_ you have a routine such that when you set a "parent" category to have a different template, a routine automatically adjusts all the chidren to use the same template. This keeps the speed of having the template set kept in the current category record, at the expense of having to make sure every category had the non-default template set (ie: no relational inheretence from the parent). Two options would be needed to be available on such an update:
1) - update _all_ children
2) - update all children with no overriding template already set
(or, with a template set matching the current override being changed)
3) - update only this category
Of course, for convenience, additional options to modify the "update" statement could be added, but those are the basics.
Sounds sort of complicated, but actually, depending on the next release, it might be fairly simple to implement as a "standard" option in the subsequent release.
PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
A few changes in the core links logic would have to be made, but basically it would follow the same idea:
use default template set
load current category
if current category has overriding template set, use that
if no overriding template, check parent. [loop until 'root']
use most currently selected set
If you have deep categories, this has a performance penalty.
To improve performance, one of two things could be done. A separate "templates" table could be maintained, such that only one lookup was done for each category, but this look up was done each and every time, so you loose the "speed" of having the default template in the Category record itself (but you have a spiffy little editor to quickly update the template sets for the category table, so it might be a good trade off), _or_ you have a routine such that when you set a "parent" category to have a different template, a routine automatically adjusts all the chidren to use the same template. This keeps the speed of having the template set kept in the current category record, at the expense of having to make sure every category had the non-default template set (ie: no relational inheretence from the parent). Two options would be needed to be available on such an update:
1) - update _all_ children
2) - update all children with no overriding template already set
(or, with a template set matching the current override being changed)
3) - update only this category
Of course, for convenience, additional options to modify the "update" statement could be added, but those are the basics.
Sounds sort of complicated, but actually, depending on the next release, it might be fairly simple to implement as a "standard" option in the subsequent release.
PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum