Hello Forum!
In continuation with this post from before http://www.couchcms.com/forum/viewtopic.php?f=4&t=8211……
Displaying events that belong only to the current month works great
. But since I have added a condition to display a sentence if there is no events in the current month, I have a problem
….The sentence won't appear...I was trying to understand where the problem lies, but I cannot find it….
I would appreciate a lot some help here..
Here is the code of what I have tried…
This is a list view of the template that has editable regions of the type "datetime" named "event_date" and "event_date_de".
I first made condition with regard to the language, so that I have displayed only english or only german version….All functions fine up to here….
When I add a condition within that, to define if the event_date within a current month is empty or not using
to display a text, that text won't display...
And I do not figure what I do wrong....
thanks in advance
Tanja
In continuation with this post from before http://www.couchcms.com/forum/viewtopic.php?f=4&t=8211……
Displaying events that belong only to the current month works great


I would appreciate a lot some help here..
Here is the code of what I have tried…
This is a list view of the template that has editable regions of the type "datetime" named "event_date" and "event_date_de".
I first made condition with regard to the language, so that I have displayed only english or only german version….All functions fine up to here….
When I add a condition within that, to define if the event_date within a current month is empty or not using
- Code: Select all
<cms:not_empty event_date_de />
to display a text, that text won't display...
And I do not figure what I do wrong....
- Code: Select all
<cms:if my_lang='en'> <!-- Language condition-->
<h3>Current Month</h3>
<cms:pages show_future_entries='1' custom_field="event_date >= <cms:show my_start_on /> | event_date < <cms:show my_stop_before />" orderby='event_date' order='asc' >
<cms:if "<cms:not_empty event_date />">
<div class="eventslist">
<div class="eventtitle"><a href="<cms:show k_page_link />"><cms:show event_title /></a></div>
<div class="eventdate"><cms:date event_date format='%b %d, %G' locale='english' charset='ISO-8859-1' /></div>
<div><cms:show event_short/></div>
</div>
<cms:else/>
There are no events in the current month. Please look the calender for the next events.
</cms:if>
</cms:pages>
<cms:else/><!-- Language condition-->
<h3>Aktueller Monat</h3>
<cms:pages show_future_entries='1' custom_field="event_date_de >= <cms:show my_start_on /> | event_date_de < <cms:show my_stop_before />" orderby='event_date_de' order='asc' >
<cms:if "<cms:not_empty event_date_de />">
<div class="eventslist">
<div class="eventtitle"><a href="<cms:show k_page_link />"><cms:show event_title /></a></div>
<div class="eventdate"><cms:date event_date_de format='%d. %b. %G' locale='german' charset='ISO-8859-1' /> </div>
<div><cms:show event_short/></div>
</div>
<cms:else/>
Im aktuellen Monat habe wir keine Veranstaltungen. Bitte sehen Sie unsere Termine für die nächste Veranstaltung.
</cms:if>
</cms:pages>
</cms:if><!-- Language condition-->
thanks in advance
Tanja