[PHPTAL] problem with passing object to template
I have the following template: div id=table_form form name=${t/classname} id=${t/classname} target=${t/classname}.php lang=PL action=post table class=table_form theadtd colspan=2${t/caption}/td/thead tbody tr tal:repeat=val t/colModel td label for=${val/name}${val/colNames}/label/tdtddiv metal:use-macro=input /div/td /tr trinput type=submit name=${t/submit_button} id=${t/submit_button} value=${t/add_item} / /tr /tbody /table /form /div div metal:define-macro=input input type=text name=${val/name} id=${val/name} value=${val/def} maxlength=${val/length} class=${ / /div As we can see almost everywhere I have to use t prefix ${t/classname} in variable. I passed an object like this: $t = $curr-get_model_ext_info(); $tpl = new PHPTAL('tpl/table_form.tpl'); $tpl-t = $t; echo $tpl-execute(); How can I get rid of t prefix($tpl-t) and access directly ex: ${classname}? I dont want to manualy assign every tag($tpl-classname=$t-classname) to proper name, just do it in one line. $t variable contains smething like this: $t-classname $t-name $t-length and so on. Any ideas? Greetings Majkel___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] problem with passing object to template
I have the following template: div id=table_form form name=${t/classname} id=${t/classname} target=${t/classname}.php lang=PL action=post table class=table_form theadtd colspan=2${t/caption}/td/thead tbody tr tal:repeat=val t/colModel td label for=${val/name}${val/colNames}/label/tdtddiv metal:use-macro=input /div/td /tr trinput type=submit name=${t/submit_button} id=${t/submit_button} value=${t/add_item} / /tr /tbody /table /form /div div metal:define-macro=input input type=text name=${val/name} id=${val/name} value=${val/def} maxlength=${val/length} class=${ / /div As we can see almost everywhere I have to use t prefix ${t/classname} in variable. I passed an object like this: $t = $curr-get_model_ext_info(); $tpl = new PHPTAL('tpl/table_form.tpl'); $tpl-t = $t; echo $tpl-execute(); How can I get rid of t prefix($tpl-t) and access directly ex: ${classname}? I dont want to manualy assign every tag($tpl-classname=$t-classname) to proper name, just do it in one line. $t variable contains smething like this: $t-classname $t-name $t-length and so on. Any ideas? Greetings Majkel___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] How to compare numbers with equal character
1. How to compare numbers with equal character. I found : LT (less than) : GT (greater than) = : LE (less or equal) = : GE (greater or equal) Where is = ? so I can use it like this: span tal:condition=php: val.type EE 253 ? Greetings Majkel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] Cache dir where
Where can I set a dir where cache files are stored?I cannot find it in project. I am working under windows and I get sometime such a path: C:\WINDOWS\Temp\tpl_1236978684_1_1_15tableformtcc8cf327fdbdf5e391edd36d143408af.php Greetings Majkel___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] Re: [multi dimension array] problem with repeat
Sure your solution seems to be more natural. I am new to PHPTAL, and I am wondering to migrate to PHPTAL from SMARTY. I am curious about this situation whether it is possible to handle such a situation with PHPTAL. ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal
[PHPTAL] Re: [multi dimension array] problem with repeat
I want to get a key of item and than use it it the loop as index of different arrays. Greetings Majkel ___ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal