Forums / Cotonti / Core Labs / Archive / Logic blocks for xtemplate

Kilandor
#9733 2009-03-11 14:46
It will require some testing. I see some circumstances it could be a cheap dirty way to do things.

If its put in the core, I don't think any core skin files should use it.

No images in the core should be output anyways, causing red-square issues with IE, if they don't exist.

And it still requires some knowledge of php to use essentially it looks like, or atleast if statment knowledge. So its something a plugin can do anyways.

I'm guessing also it would require more parsing time, due to it has to look for code it has to execute, and if someone bloated their page with "logic" blocks it could cause longer executions

I totaly agree with Orkan, logic should stay away from the HTML, thats the whole point of using a template engine. Otherwise we could just do the stupid stuff you see in other CMS's and crappy PHP programming using <?php echo "blah"; ?> in our files.

I know this is an example, but I see it uses Eval which could be potentially bad, If a admin used a If that some how came from userinput it could leave the possiblity for arbitrary php execution by a user, allowing them to do anything they wish.

It would need to be a restricted enviroment something like sed_url
This post was edited by Kilandor (2009-03-11 15:11, 15 years ago)