Surprised you haven't gotten any replies yet...
Very cool extension. Something I've been wanting to have, and was about to write my own, so thanks!
Bonus points for content elements, too. Never thought about that, but now that I have, I can see scenarios where that would be useful to have.
One suggestion I have is to enable this for articles as well.
Another thing -- and this is a little more complex, I know -- but it might be really cool to have some configuration options, even if its just via a configuration array. Here's what's crossed my mind in the past...
Code:
$GLOBALS['TL_CONFIG']['TEMPLATE_OVERRIDES'] = array // or wherever it should go...
(
// Stuff not defined here work as they do now -- no restrictions or friendly names...
'text' => array // This is the key that's defined in the 'TL_CTE' array...
(
// These are template file names...
'ce_text_something' => 'Some Friendly Name',
'ce_text_something_else' => 'Another Friendly Name',
'ce_text_another_thing',
),
'headline' => array() // Don't allow template overrides
);
So in other words you'd specify certain CE's/modules that only allow certain templates to appear in the menu (or none at all) and be selected, and optionally a friendly name can be specified in place of the actual template name.
I was thinking that by having restrictions and friendly names, this could potentially be useful to give clients access to. Maybe not so much for modules, but for content elements -- so they can choose between different formats when the need arises, much like how Ruud's extension allows CSS classes via a select menu.
What do you think? Dumb idea?
Bookmarks