Answer the question
In order to leave comments, you need to log in
Question about smarty and cms made simple (but rather just smarty)
There is a template in which I display information about age:
Возраст: {$entry->fields.age->value}
And there is a module with products that displays this information for each product.
to run it, you need to register on the page {Products}
Let's say I want to display all products with an age of 25 years.
How can I set this in the template so that by writing {Products age="25"} on the page I can display it?
I hope I explained clearly.
I hope for your help.
Answer the question
In order to leave comments, you need to log in
{foreach from=$Products item=entry}{if $entry->fields.age->value>25}
{/if}{/foreach}
I didn't quite understand the array structure, but I hope you got the idea.
foreach
if
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question