|
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 |
EliOklesh Smarty Rookie
Joined: 18 Nov 2014 Posts: 5
|
Posted: Tue Nov 18, 2014 7:52 pm Post subject: Loop help |
|
|
Hi all -
I recently took over a project from another developer. I've never used Smarty before and so far I am enjoying it. I'm hoping someone can either advise me, or point me in the direction of some documentation that would help me regarding the issue below:
The project is a site for teachers to log students' progress in a math app for iPad. When a teacher logs in, a page appears showing all their students. I recently had to add functionality for a teacher to have multiple classes. Now I'm just having trouble getting the STUDENTS page to separate the classes from each other.
I know I'm probably going to be nesting some {foreach} loops here, but so far everything I've tried has failed.
I appreciate any insight anyone can offer. Thanks! |
|
Back to top |
|
KelvinSmith Smarty n00b
Joined: 19 Nov 2014 Posts: 1
|
Posted: Wed Nov 19, 2014 6:26 am Post subject: |
|
|
Are you using any SQL query for that? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Fri Nov 21, 2014 1:03 am Post subject: |
|
|
The simple answer is: Smarty have nothing to do with your question.
You gotta make the data prepared in your code for proper rendering. Which means, the lists should be separated by class before you pass them to Smarty. Or even better, only retrieve the class you're interested in. |
|
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
|