|
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 |
devniv Smarty Rookie
Joined: 18 Jun 2003 Posts: 5
|
Posted: Sat Jun 19, 2004 7:04 pm Post subject: {section} begrenzen |
|
|
hat mir jemand ne idee, wie ich die Ausgabe von Section irgendwie begrenzen kann? (durch eine for-schleife oder so?)
ich hab mir nen pager gebastelt und den lasse ich mir unter anderem als momentan einzeilige Tabelle ausgeben.. nur wenn die Anzahl der Unterteilungen (1-5, 6-10, usw) durch eine hohe Anzahl von Datensaetzen (ab 40-45) auch noch in die Hoehe getrieben werden, hab ich bald ein problem mit meiner einzeiligen Tabelle.
Nun will ich irgendwie mit Smarty bewirken, dass nach einer bestimmen Anzahl, die ich festlegen kann eine neue Zeile eingebaut wird.
Hat mir jemand ne idee, wie ich das machen soll?
Code: |
[ 1-5 ] [ 6-10 ] [ 11-15 ] [ 16-20 ] [21-25 ] [26-30 ] [ 31-35] [ 36-40 ]
[ 41-46] [ 47-50 ] [ 51-55] [ 56-60 ]
|
sollte in etwa so aussehen...
nach 36-40 will ich nen zeilenumbruch.. |
|
Back to top |
|
Adar Smarty Regular
Joined: 27 May 2004 Posts: 58
|
Posted: Sat Jun 19, 2004 9:45 pm Post subject: |
|
|
pseudo-code...
Code: |
{section name=foo loop=$array}
{if $smarty.section.foo.index div by 10} <br>
{else}
{$array[foo]}
{/section}
|
|
|
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
|