Hi,
Just wondering someone if someone can help i need to have a small section on my site which will show upcoming events in the calendar. All I need to do is to get the upcoming events listed as compact as possible.
- Event 1 (with a link to the detailed event replacing the need for the more)
date and time of event (dd/mm/yy mm:hh)
- Event 2 (with a link to the detailed event replacing the need for the more)
date and time of event (dd/mm/yy mm:hh)
- Event 3 (with a link to the detailed event replacing the need for the more)
date and time of event (dd/mm/yy mm:hh)
Is this possible? Could someone help or point me in the right direction.
[Solved] CGCalendar upcoming list - template tweak
[Solved] CGCalendar upcoming list - template tweak
Last edited by mjrumble on Mon Oct 26, 2009 9:54 am, edited 1 time in total.
-
Peciura
Re: CGCalendar upcoming list - template tweak
Open "Content > Calguys Calendar > Upcoming Templates" and create template lets say "test"
Create template similar to this:
In content call CGCalendar
Don't forget to style "calendar-date-from" class (padding might be just what you want).
In template you can find tag "{$event.event_date_start|date_format:"%e"}" ,
more about date formats you can find at http://www.smarty.net/manual/en/languag ... format.php
Create template similar to this:
Code: Select all
<div class="calendar-list">
{if isset($navigation)}
{if isset($navigation.prev)}<span class="calendar-prev"><a href="{$navigation.prev}">{$lang.prev}</a></span>{/if} {if isset($navigation.next)}<span class="calendar-next"><a href="{$navigation.next}">{$lang.next}</a></span>{/if}
{/if}
<h1>{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}</h1>
{foreach from=$events key=key item=event}
<div class="calendar-event">
<div>- <a href="{$event.url}">{$event.event_title}</a></div>
<div class="calendar-date-from"> {$event.event_date_start|date_format:"%e"}</div>
</div>
{/foreach}
{if $return_url != ""}
<div class="calendar-returnlink">{$return_url}</div>
</div>
{/if}
Code: Select all
{cms_module module="CGCalendar" display=upcominglist upcominglisttemplate=test }In template you can find tag "{$event.event_date_start|date_format:"%e"}" ,
more about date formats you can find at http://www.smarty.net/manual/en/languag ... format.php
Re: CGCalendar upcoming list - template tweak
Hi thanks for the fast reply work perfect apart from one small issue. When the date is shown it only shows the day. How do I edit this to show (dd/mm/yy HH:MM)?
Re: CGCalendar upcoming list - template tweak
Sorted
Hi sorry for previous reply did not see the last link with you. All is working no thanks for all your help.
Hi sorry for previous reply did not see the last link with you. All is working no thanks for all your help.

