17 ms·
I agree, but the point is it is not a rewrite to add a templating engine to Wordpress; in fact it would be a (relatively) simple additional theme style that cou
by Robin_Message 16y ago
I agree, but the point is it is not a rewrite to add a templating engine to Wordpress; in fact it would be a (relatively) simple additional theme style that could co-exist with the existing PHP themes.
- byoung2 16y agoin fact it would be a (relatively) simple additional theme style that could co-exist with the existing PHP themes In the process of adding a templating system to Wordpress you would come across many instances where you'd wish that instead of having to bother with structures like: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> ...add posts to an array, then assign to template... The developers had just used an object model that let you do something like: $smarty->assign('POSTS',Post::getRecent(10)); And then access them in the template like this: {{foreach from=$POSTS item=post name=posts}} <h2>{{$post->title|truncate}}</h2> <p>{{$post->content}}</p> {{$post->url->permalink}} {{/foreach}}