Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.13

Request #1247 Some new feature request (Docs missing - toJavascript etc.)
Submitted: 2004-04-20 22:19 UTC
From: boci at dravanet dot hu Assigned: alan_k
Status: Assigned Package: HTML_Template_Flexy
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2004-04-20 22:19 UTC] boci at dravanet dot hu
Description: ------------ Hi! I think flexy needed some feature. 1. not in class method call (example global functions) 2. not in class variable insert ($GLOBALS, $_POST, $_SESSION) I think the right way this: {globals:variablename} or {post:variablename} 3. normal for support 4. if with validation set example: {if:value:othervalue=newvalue} 5. More-more-more documentation (more example, how to use the GetText support, toJavaScript usage, create own tags) Question: how to use an external function (example sizeof()) in if? I know this is a bug report but I don't know how can I ask. Cow (ICQ: 73963523, MSN: boci13@hotmail.com) Cow

Comments

 [2004-04-21 01:37 UTC] alan_k
Yeap - best place in the world for this.. 1. - making functions available. I guess it could be made available via {GLOBALS.thefunction()} It would probably be off by default. 2. - I have been thinking about these: {_SESSION[...]} {_POST[...]} will probably be added (when I get round to it.) 3. - could you explain this. 4. - This gets into the messy area of mixing code into the template - I'm not keen to do asignments {if:aaaa!=#xxxxxx#}{if:aaaa==#xxxxxx#} may be a valid option. 5. there is rough examples of some of it in the examples folder.. - real docs in docbook can take a bit of time to get round to. Question: a) empty arrays evaluate to 0 so {if:someArray} {if:!notSomeArray} should work. b) assign some variable before rending the template: $this->someVarSizeOf[sizeof($somevar)] = true; on template: {if:someVarSizeOf[2]} .....
 [2004-04-21 08:19 UTC] boci at dravanet dot hu
Hi! Thanx the answers 3. {loop:i=5} -> for($i=0;$i<5;$i++) or flexy:loop=5 or flexy:loop="internalvar:5" Cow
 [2004-04-21 08:57 UTC] alan_k
1. : {GLOBALS.thephpfunction()} if options[globalfunctions] is true 2. : all available if options[globals] = true 3 & 4 : use raw PHP, will allowPHP on.. ** this need fixing Adding it to the tokenizer is far too complex, and this begins to break the line between template shortcuts and putting too much intelligence in the template. 5. : TODO
 [2004-04-21 12:09 UTC] alan_k
3&4: allowPHP option now working - this should be sufficient.
 [2004-07-24 04:44 UTC] alan_k
change title to something more usefull.
 [2005-05-23 17:02 UTC] john at curioussymbols dot com
Hi Alan I'd just like to second the request for some documentation, especially of the 'tojavascript' thing. It's been a major source of problems for me when installing my codebase on different systems, so a few clearly-expressed words about what are the options for inserting {tags} into <script> blocks would be really helpful. Cheers JP