[Solved] CGCalendar upcoming list - template tweak

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
mjrumble
Forum Members
Forum Members
Posts: 19
Joined: Tue Sep 15, 2009 7:59 pm

[Solved] CGCalendar upcoming list - template tweak

Post by mjrumble »

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.
Last edited by mjrumble on Mon Oct 26, 2009 9:54 am, edited 1 time in total.
Peciura

Re: CGCalendar upcoming list - template tweak

Post by Peciura »

Open "Content > Calguys Calendar > Upcoming Templates" and create template lets say "test"
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}

In content call CGCalendar

Code: Select all

{cms_module module="CGCalendar" display=upcominglist upcominglisttemplate=test }
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
mjrumble
Forum Members
Forum Members
Posts: 19
Joined: Tue Sep 15, 2009 7:59 pm

Re: CGCalendar upcoming list - template tweak

Post by mjrumble »

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)?
mjrumble
Forum Members
Forum Members
Posts: 19
Joined: Tue Sep 15, 2009 7:59 pm

Re: CGCalendar upcoming list - template tweak

Post by mjrumble »

Sorted
Hi sorry for previous reply did not see the last link with you. All is working no thanks for all your help.
Post Reply

Return to “Modules/Add-Ons”