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

Zeit vergleich und Ausgabe

 
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
crusard
Smarty n00b


Joined: 07 Nov 2013
Posts: 3

PostPosted: Wed Apr 23, 2014 9:40 am    Post subject: Zeit vergleich und Ausgabe Reply with quote

Servus,

ich habe gerade folgendesProblem :/ Für meine Events habe ich normal in der Funktion eine getDate() getter Funktion und in Smarty lasse ich das ganze via foreach laden.

Nun wollte ich aber, wenn das Event abgelaufen ist, dass 1 Stunde lang das Event noch angezeigt wird danach aber nicht aber statdessen halt ein Hinweis, dass z.B: keine Events vorhanden sind.

Die Ausgabe funktioniert auch aber leider die Ausgabe des Textes in der else nicht :/

Code:

{foreach from=$events item=eventItem} 
                    {if $eventItem->getDate() < time(60*60)}
event 1
{else}
                        Keine Events vorhanden
                    {/if}
      {/foreach} 


Leider funktioniert das nicht soo ganz - die Message mit keine events vorhanden wird nicht ausgegeben solange ich mit < time(60*60) arbeite
Back to top
View user's profile Send private message
crusard
Smarty n00b


Joined: 07 Nov 2013
Posts: 3

PostPosted: Wed Apr 23, 2014 10:03 am    Post subject: Reply with quote

Okay mit foreachelse funzt es endlich Very Happy
Back to top
View user's profile Send private message
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