Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

{section} begrenzen

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
devniv
Smarty Rookie


Joined: 18 Jun 2003
Posts: 5

PostPosted: Sat Jun 19, 2004 7:04 pm    Post subject: {section} begrenzen Reply with quote

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
View user's profile Send private message
Adar
Smarty Regular


Joined: 27 May 2004
Posts: 58

PostPosted: Sat Jun 19, 2004 9:45 pm    Post subject: Reply with quote

pseudo-code...

Code:

{section name=foo loop=$array}
{if $smarty.section.foo.index div by 10} <br>
{else}
{$array[foo]}
{/section}
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP