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

Request #12515 can't put param from foreach into quoted method call
Submitted: 2007-11-23 20:01 UTC
From: bigdeny Assigned:
Status: Verified Package: HTML_Template_Flexy (version 1.2.5)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-11-23 20:01 UTC] bigdeny (Bigdeny Dddd)
Description: ------------ I would like to pass a foreach value into quoted method call Test script: --------------- {foreach:alphabet,letter} <a href="{makeUrl(#list#,#customer#,#customer#,##,#filter|#letter)}">{letter}</a>  {end:} Expected result: ---------------- somehow to be able to put a value of foreach value (e.g letter in this case) into a quoted string e.g if letter is A, then the script would get the 5th param as filter|A It could be nice if you could do sth. like that: {makeUrl(#list#,#customer#,#customer#,##,#filter|#letter#blah#someOtherVariable....)} Or thinking a bit about this. It might be posible if flexy would allow doing sth like that. {flexy:setvar,var_name,#string.content#,somevar,anotherVar,#moreStringcontent#} this would then create a new variable with name var_name and value with concatenated "static strings" + values of variables Actual result: -------------- flexy fails to compile template... or if putting letter inside ##, then it simply outputs the word.

Comments

 [2008-01-01 13:31 UTC] alan_k (Alan Knowles)
unless it's an easy fix (eg. patch attached) - doing this in the callback function is the best solution. = The code to generate the func. calls/foreach is already complex.. - so I'd be carefull about adding more complexity.