Welcome Guest, Not a member yet? Register   Sign In
CI Template Parser
#6

[eluser]Phil Sturgeon[/eluser]
I'd say the main thing is that the view should have as little logic as possible, doesn't matter which kind of tags show up.

If you are worried about designers, most editors will recognise the PHP tags and show a symbol or hide them on the Design mode, whereas random tags will show up as broken or plain text. That's no help for the designer at all!

Also, the ability to make minor changes to a value without having to set X different versions of the same variable are a godsend. What's the point in returning and array/object from your model, then having to loop through every item simply to set a few different date formats?

I think the one thing - other than the obvious bugs - missing from the Template Parser is Smarty-like modifiers. If you were using Smarty here, you could simply do:

Code:
<span class="day">{date|date_format:"%e"}</span>

Disclaimer: my point about Template Parser being buggy is based it's state at the time. It had trouble using the same loop twice on one page and loops had trouble with non-zero based indexes. It may be better by now, but it is still lacking.


Messages In This Thread
CI Template Parser - by El Forum - 12-27-2008, 04:41 PM
CI Template Parser - by El Forum - 12-27-2008, 07:05 PM
CI Template Parser - by El Forum - 12-28-2008, 02:25 AM
CI Template Parser - by El Forum - 12-29-2008, 03:57 AM
CI Template Parser - by El Forum - 12-29-2008, 04:39 AM
CI Template Parser - by El Forum - 12-29-2008, 06:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB