Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
FF Matrix and the Query Module
Is there a way to get an FF Matrix field to function inside of a query module tag? If I simply put the field name in curly brackets in my template, I get the literal contents of it.
Official
Response
-
EMPLOYEE
1Sorry, it only works within exp:weblog:entries.
-
-
-
I discovered this today. For what's it worth, you *cannot* use an FF Matrix tag pair nested in a query module tag pair, but you *can* use the weblog entry tag pair inside the query module tag pair.
So, something like this is working for me (this is just an example):
{exp:query sql="SELECT entry_id FROM exp_weblog_data WHERE weblog_id = 1"}
{exp:weblog:entries weblog="1" entry_id="{entry_id}"}
{ff_matrix}
{title}
{/ff_matrix}
{/exp:weblog:entries}
{/exp:query}
As long as your SQL query returns _entry_id_ as a field, you can pass that dynamically into the weblog tag pair and it will loop through all the results.
Not tested thoroughly, but working well for me.-
This works alright, but if your query returns more than one result, you're effectively making multiple {exp:weblog:entries} tags which makes dealing with the entries (sorting, etc.) difficult.
-
-
-
-
Loading Profile...





