|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
heliomoreira Smarty n00b
Joined: 19 Jan 2015 Posts: 3
|
Posted: Mon Jan 19, 2015 6:40 pm Post subject: Arrays Smarty- Help |
|
|
Hi everyone,
I'm beginner on Smarty.
I need to do this:
I have one array with categories and products.
Now, i need create tabs with only categories from that array (without duplicate items), and another list with produts for each tab/category.
Something like this:
array (category1, product1, category 2, product 2, category2, product 2.1)
The "Tabs"
[b]Category1[/b]
Product1
[b]Category2[/b]
Product 2
Product 2.1
Thank you.
Best Regards,
HMoreira |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Jan 19, 2015 11:26 pm Post subject: |
|
|
For that, you need to write code, which will be doing it.
This is not a Smarty question. |
|
Back to top |
|
heliomoreira Smarty n00b
Joined: 19 Jan 2015 Posts: 3
|
Posted: Tue Jan 20, 2015 9:09 am Post subject: |
|
|
Hi AnrDaemon,
Thank you for your reply.
I know do this in "Pure" PHP, but not in smarty.
Thank you.
BR
HMoreira |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Jan 20, 2015 9:24 am Post subject: |
|
|
That's exactly what I said.
Data manipulation is not a task for template engine.
Template engine need already prepared data it can put into template and show to the user. |
|
Back to top |
|
heliomoreira Smarty n00b
Joined: 19 Jan 2015 Posts: 3
|
Posted: Tue Jan 20, 2015 9:34 am Post subject: |
|
|
Hi AndDaemon,
Thanks. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|