Sintags: special syntax for view Templates

thread: 4 messages  |  last: about 3 years ago  |  started: wednesday, march 19, 2008, 9:58 am pdt


#1  |  oliver (Munich) Germany
Wednesday, March 19, 2008, 9:58 AM PDT

Sintags is a nice little template syntax for PHP
<http://www.bermi.org/sintags/index.html>

Maybe there is a way to integrate it?

Example Sintags:

{loop posts}
    {post.comment?} {post.author?} 
{end}

Created PHP CODE:

empty($posts) ? null : $post_loop_counter = 0;
if(!empty($posts)){
    foreach ($posts as $post_loop_key=>$post){
        $post_loop_counter++;
        $post_odd_position = $post_loop_counter%2;
        echo isset($post->comment) ? $post->comment : '';
        echo isset($post->author) ? $post->author : '';
    }
}

My main objective is to have a fully valid (X)HTML-template without PHP-code inbetween. And Sintags templates are much nicer to read and easier to edit.

Thanks & greetings,
Oliver


SDG

#2  |  Igor Alpert (Ukraine) Ukraine
Wednesday, April 23, 2008, 6:10 AM PDT

Yeah! I what that feture too...

maybe even somthing like

<c:QForm attr1=“" attr2=““>

...

</c:QForm>

#3  |  Geert Heremans (Antwerp,Belgium) Belgium
Wednesday, April 23, 2008, 6:28 AM PDT

Hi Guys,

for one of my projects I want to give the user the ability to creathe his/hers own datarepeater without usig the syntaxt of Qcodo (eg $_ITEM->blabla). I want to substitute that with a simpler syntaxt like this or maybe smarty.

Does anyone has som experience with this (letting the user to create his/own custom datarepeater themplate). Or do you havve an idea on how I could implement this?

Best regards
Geert

#4  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Monday, July 7, 2008, 5:14 AM PDT

In my opinion, a template language is out of the scope of Qcodo.

I don't know how difficult would be to integrate your favorite template language into the Qcodo rendering engine, but PHP is itself a template language, so I really don't see the need.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.