Scaffolding and DB Queries
Has anyone successfully used the {sql} plugin to populate Scaffolding tags with data? For example, (and this does not work),
{list-data:dynamicList}
{sql}
select concat('{list-option}', foo, '{list-option}') FROM bar WHERE...
{sql}
{list-data}
basically i'm just trying to stick some query results into a scaffolding call.
thanks a lot.
{list-data:dynamicList}
{sql}
select concat('{list-option}', foo, '{list-option}') FROM bar WHERE...
{sql}
{list-data}
basically i'm just trying to stick some query results into a scaffolding call.
thanks a lot.
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?I think the simplest way to pull this off would be to pipe it though the Replace and Render plugin. Eg:
{replace-and-render}
{replace-item:%items%}
{sql}
select concat('{list-option}', foo, '{list-option}') FROM bar WHERE...
{sql}
{replace-item}
{replace-body}
{list-data:dynamicList}
%items%
{list-data}
{replace-body}
{replace-and-render}
1 person says
this answers the question
-
{replace-and-render}, good stuff. works like a charm. one does need to set a '|table=false' parameter to the {sql} macro or you get a wacky IllegalGroupError. Thank you very much.
Loading Profile...



EMPLOYEE