|
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 |
crusard Smarty n00b
Joined: 07 Nov 2013 Posts: 3
|
Posted: Wed Apr 23, 2014 9:40 am Post subject: Zeit vergleich und Ausgabe |
|
|
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 |
|
crusard Smarty n00b
Joined: 07 Nov 2013 Posts: 3
|
Posted: Wed Apr 23, 2014 10:03 am Post subject: |
|
|
Okay mit foreachelse funzt es endlich |
|
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
|