1
I think, I found my way of implementing more or less universal solution for creating "special blocks" in theme.
I want to discuss it and ask for possible refactoring of not-so-elegant (from my humble POV) smaty-peace.
Preface:
Imagine you have different designs for your theme, and want to implement in (template|language)-independent form with minimal work from end-user side.
Suggested solution:
Use blocktitle and add to titles special signs, which identify "special requirement" for this block. Before display blocktitle technical part must be removed
Implementation:
For block-types Alpha, Bravo, Charlie created 3 piece of code and types names used as block identity. No idenity means default block
Theme used something like
<{if $block.title|regex_replace:"/.*Alpha/":"Alpha" eq "Alpha"}>
...
Alpha block code with
<{$block.title|replace:"Alpha":""|strip}>
...
<{/if}>
<{if $block.title|regex_replace:"/.*Bravo/":
Bravo block code with
....
<{/if}>
<{if $block.title|regex_replace:"/.*Charlie /":
Charlie block code with
...
<{/if}>
default block code
This way user of theme have to have only small addons to block titles (in source language, or, with small changes in theme, which can be easy described in theme doc - in own language)