[eluser]BenneX[/eluser]
[quote author="Phil Sturgeon" date="1245113358"]Might be going a little far.
I think I can get away with just modifying the parse_single() function to allow syntax such as {helpername:helperfunction|"arg1":"arg2":"arg3"}. What do you guys think?[/quote]
Hmm. Sounds very well, but I think it doesn't make very much sense. It won't optimate the work of an theme-designer. The main term of a template-system is to give the theme-designer as few as possible placeholders to allow a great flexability. It should be easy to see what the placeholder will print out to make it easy to pose the dynamic output whereever you want. A call of a function within the views means an untransparent output, because you don't know the format of the returned output. To make it absolutely clear, an easy Example:
Code:
<!-- Here it's easy to handle -->
<div id="content">
<h2>{CONTENT_HEADLINE}</h2>
<p>{CONTENT_INTRO_TEXT}</p>
<!-- And here it's impossible to handle -->
<? $this->content->createTable('Headline', $this->data->tableXY, 'cellpadding="0" id="tableXY"'); ?>
<!-- Better is to allow this -->
<h3>{TABLE_XY_HEADLINE}</h3><table {TABLE_XY_PARAMS}>
<!-- TABLE_XY_ROW begin -->
<tr>
<!-- TABLE_XY_COL begin -->
<td>{TABLE_XY_VALUE}</td>
<!-- TABLE_XY_COL end -->
</tr>
<!-- TABLE_XY_ROW end -->
</table>
</div>
Okay, a table is not the best example, but you'll see you have full control of the markup. Know it's very easy to add a specific class for advanced styling. You only need to add them in the template-file and see clearly where to do it. A function call is just in one case transparent... when it loads another viewfile but a placeholder is a better solution too.
I love the template-system of phpBB2 very much. Very useful and not overblewed Maybe it can be migrated to ci? What you guys think about?