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

Schleife ohne Array

 
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
kid
Smarty Rookie


Joined: 04 Jul 2004
Posts: 13

PostPosted: Thu Aug 19, 2004 5:20 pm    Post subject: Schleife ohne Array Reply with quote

Hallo,

geht und wenn wie in Smarty ne Schleife ohne Array Question

cycle, foreach und section könnens nicht, oder?

Viele Grüße,

Alexander
Back to top
View user's profile Send private message AIM Address MSN Messenger
coach
Smarty Regular


Joined: 03 Jun 2004
Posts: 65

PostPosted: Thu Aug 19, 2004 6:24 pm    Post subject: Reply with quote

Mir fällt jetzt

Code:

{php}
for () {
{/php}

{php}
}
{/php}


ein. Müßte wohl klappen. Oder irgendwie per xrange ein Array erzeugen und darüber dann mit section etc. arbeiten. Den xrange kannst auf alle Fälle im {php}{/php} machen und dann dem $this->.. zuweisen. Ob es per {assign } geht mußt du testen.

Coach
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Aug 19, 2004 7:53 pm    Post subject: Reply with quote

{section} ist eigentlich eine for-schleife.

{section name=i loop=10}
{$smarty.section.i.index}
{/section}

liefert: 0 1 2 3 4 5 6 7 8 9
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kid
Smarty Rookie


Joined: 04 Jul 2004
Posts: 13

PostPosted: Thu Aug 19, 2004 9:12 pm    Post subject: Reply with quote

Wink vielen Dank! Das funzt. Schade, dass das nicht in der Doku als Beispiel drin ist.
Back to top
View user's profile Send private message AIM Address MSN Messenger
pxlArtizzt
Smarty Rookie


Joined: 09 Aug 2004
Posts: 13

PostPosted: Wed Aug 25, 2004 7:46 am    Post subject: Reply with quote

genau, sowas gehört echt in die Dokumentation!!! Cool
Back to top
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 25, 2004 9:26 am    Post subject: Reply with quote

das steht in der faq:
http://smarty.incutio.com/?page=SmartyFrequentlyAskedQuestions#template-9

und das reicht IMHO.
Back to top
View user's profile Send private message Send e-mail 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