S
S
Sergey2011-09-27 18:53:57
CMS
Sergey, 2011-09-27 18:53:57

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

2 answer(s)
X
xaker1, 2011-09-27
@xaker1

{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

S
Sergey, 2011-09-27
@butteff

He asked, he answered.
It could have been done using cms made simple
{Products action="fieldlist" field="age" fieldval="25"}
But it's still interesting how smart could get out?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question