how to show cgcalendar categories??
how to show cgcalendar categories??
Dear All,
I would like to show the cgcalendar categories an event is posted in to the website visitors...
Normally this would be called with a smarty variable like {$event.event_categories} (this doesn't work!)
There are tons of variables to be called when using the cgcalendar module but no variable to call the categories... strange...
Some variables that are available:
{$first_of_month_weekday_number}
{$event.event_title}
{$event.url}
.....
cfr: http://dev.cmsmadesimple.org/feature_request/view/4480
Does anybody have a solution?
Greetings,
Manuel
I would like to show the cgcalendar categories an event is posted in to the website visitors...
Normally this would be called with a smarty variable like {$event.event_categories} (this doesn't work!)
There are tons of variables to be called when using the cgcalendar module but no variable to call the categories... strange...
Some variables that are available:
{$first_of_month_weekday_number}
{$event.event_title}
{$event.url}
.....
cfr: http://dev.cmsmadesimple.org/feature_request/view/4480
Does anybody have a solution?
Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
Re: how to show cgcalendar categories??
The news module uses the {$entry->category} tag...
What about the cgcalendar module?? The tag above doesn't work in cgcalendar...
Is anyone aware of a way to show the category in cgcalendar?
Greetings,
Manuel
What about the cgcalendar module?? The tag above doesn't work in cgcalendar...
Is anyone aware of a way to show the category in cgcalendar?
Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
Re: how to show cgcalendar categories??
I found a solution by myself - you only have to change it to your needs (the if in the middle)
I tried some other possibilities written here in the forum, they all didn't work - but I don't know why. Till I know an other (more simple) solution, it works for me
Code: Select all
{foreach from=$categories key=category item=item}
{foreach from=$item key=categories1 item=item1}
{foreach from=$item1 key=categories2 item=item2}
{if ($item2== 'KATEGORIENAME')
<strong>Text: </strong>{$item2}
{/if}
{/foreach}
{/foreach}
{/foreach}
Re: how to show cgcalendar categories??
Of course this is just example and you will probably use loops ({foreach} statements) to list categories for each event.
Here are other options how to debug any variable were it {$event}, {$entry} or {$tem} or any other variable:
Manuel, you can find out about variables used in template in 2 steps :
1. put tag to template {get_template_vars}, i put it in CGCalendar calendar "Sample" template and it listed me all variables available there
2. choose variable that is named like variable you are interested in (in my case chose {$days}) and inspect its properties:
This is just one day of 30 in that month. Event belongs to 4 categories
If you want to list categories do it like this
and out put is
Here are other options how to debug any variable were it {$event}, {$entry} or {$tem} or any other variable:
{get_template_vars}, {var_dump var=$entry}, {dump item=$entry}, {$entry|debug_display}, {$entry|print_r}
Manuel, you can find out about variables used in template in 2 steps :
1. put tag to template {get_template_vars}, i put it in CGCalendar calendar "Sample" template and it listed me all variables available there
2. choose variable that is named like variable you are interested in (in my case chose {$days}) and inspect its properties:
Code: Select all
{$days|debug_display}
You can look at categories of any event like thisNumber of elements: 2
Array
(
['url'] => http://blah.lt/index.php?mact=CGCalenda ... 7&hl=lt_LT
[events] => Array
(
[0] => Array
(
[event_id] => 25
[event_title] => test today
[event_summary] => test today
[event_details] => {news_ids ids='391' summarytemplate='summary' }
[event_date_start] => 2010-04-11 19:15:00
[event_date_end] => 2010-04-12 13:00:00
[event_parent_id] => -1
[event_recur_period] => none
[event_date_recur_end] =>
[event_created_by] => 1
[event_create_date] => 2010-01-11 19:24:33
[event_modified_date] => 2010-04-09 21:39:00
[event_recur_nevents] => -1
[event_recur_interval] => 1
[event_recur_weekdays] =>
[event_recur_monthdays] =>
['url'] => http://test.blah.lt/index.php?mact=CGCa ... 7&hl=lt_LT
[categories] => Array
(
[0] => Array
(
[category_id] => 1
[category_name] => Renginiai, projektai
[category_order] => 50
)
[1] => Array
(
[category_id] => 2
[category_name] => Sanitarinės dienos
[category_order] => 50
)
[2] => Array
(
[category_id] => 3
[category_name] => Seminarai, mokymai
[category_order] => 50
)
[3] => Array
(
[category_id] => 4
[category_name] => blah_rekomenduoja
[category_order] => 50
)
)
[fields] => Array
(
)
)
)
)
Code: Select all
{$days[11].events[0].categories|debug_display}
Code: Select all
{assign var='temp' value=$days[11].events[0].categories}
{foreach from=$temp item='one_category'}
{$one_category.category_name}<br/>
{/foreach}}
Renginiai, projektai
Sanitarinės dienos
Seminarai, mokymai
lvjc_rekomenduoja
Last edited by Peciura on Fri Apr 30, 2010 4:42 pm, edited 1 time in total.
Re: how to show cgcalendar categories??
I am also trying to show the event category on both the list template and event detail page (using CGCalendar 1.5.2 and CMSMS 1.8.2).
I have tried both the above solutions but I can't get it to work. I'd like each event on this page http://www.stjohnscathedral.com.au/events/events-calendar.html to display the category under the event title and date. For example:
Mandolins in Brisbane - "Garlands"
Date: Fri 1 Oct 2010
Time: 8pm
Category: Music
I'd also like this to happen on the 'more details' page.
Does anyone have a solution for this? your suggestions are very welcome
I have tried both the above solutions but I can't get it to work. I'd like each event on this page http://www.stjohnscathedral.com.au/events/events-calendar.html to display the category under the event title and date. For example:
Mandolins in Brisbane - "Garlands"
Date: Fri 1 Oct 2010
Time: 8pm
Category: Music
I'd also like this to happen on the 'more details' page.
Does anyone have a solution for this? your suggestions are very welcome

Re: how to show cgcalendar categories??
beattie, beattie, beattie, beattie, beattie, beattie, beattie, beattie, beattie, beattie, beattie, beattie ...
Need your list and event detail templates posted.
Need your list and event detail templates posted.
Re: how to show cgcalendar categories??
Pecuria! Pecuria! I was hoping you'd see my post!
The list template is:
and the event display template is:
What I was hoping to achieve was something like this:
But there is no event category var and I am not good at code.
Ideally, I would like it to have an if clause so that if the event is private and closed to the public, e.g. the category is 'Ambassador Members' or 'Staff' then the output would add the sentence '(private event, by invitation only)', e.g.
Category: Staff (private event, by invitation only)
or
Category: Ambassador Members (private event, by invitation only)
But if the category is a public event like 'Music' or 'Fundraising' then there would be no additional sentence and the output would be:
Category: Music
or
Category: Fundraising
I hope that makes sense??
The list template is:
Code: Select all
<div>
<h2 style="text-align:center; text-transform:uppercase;font-size:20px;color:#98a677;">{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}</h2>
<div style="border-bottom: 2px solid #f0f0f0; padding:8px">
{if isset($navigation)}
{if isset($navigation.prev)}<a style="font-size:11px;text-transform:uppercase;float: left;text-decoration:none" href="{$navigation.prev}">{$lang.prev}</a>{/if}
<span style="padding-left:25px;color: #e11831;font-size:11px;text-transform:uppercase;"><a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=1&mb064creturnid=103&page=103
">Jan</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=2&mb064creturnid=103&page=103
">Feb</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=3&mb064creturnid=103&page=103
">March</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=4&mb064creturnid=103&page=103
">Apr</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=5&mb064creturnid=103&page=103
">May</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=6&mb064creturnid=103&page=103
">Jun</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=7&mb064creturnid=103&page=103
">Jul</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=8&mb064creturnid=103&page=103
">Aug</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=9&mb064creturnid=103&page=103
">Sep</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=10&mb064creturnid=103&page=103
">Oct</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=11&mb064creturnid=103&page=103
">Nov</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=12&mb064creturnid=103&page=103
">Dec</a></span>
{if isset($navigation.next)}<a style="color: #685e47;font-size:11px;text-transform:uppercase;float: right;padding-top:0px;margin-top:0px;text-decoration:none" href="{$navigation.next}">{$lang.next}</a></span>{/if}
{/if}
</div>
<p style="padding-top:20px"> </p>
{if !empty($events)}
{foreach from=$events key=key item=event}
<div>
<h2><a style="color: #a6b483;font-size:21px;text-decoration:none" href="{$event.url}">{$event.event_title}</a></h2>
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {$event.event_date_start|date_format:"%a %e %b %G"}<br/>
{else}
{if $event.event_date_start|date_format:"%a %e %b %G" == $event.event_date_end|date_format:"%a %e %b %G"}
<span style="color:#666633;font-weight:bold">{$lang.date}: </span>{$event.event_date_start|date_format:"%a %e %b %G"} <br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%H:%M%P"} - {$event.event_date_end|date_format:"%H:%M%P"}<br/>
{else}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {$event.event_date_start|date_format:"%a %e %b %G"} to {$event.event_date_end|date_format:"%a %e %b %G"}<br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%H:%M%P"} {$lang.to} {$event.event_date_end|date_format:"%H:%M%P"} <br/>
{/if}
{/if}
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" || $event.event_details == "<br />"))}
<div class="description" style="padding-top:10px">{$event.event_summary}</div>
{/if}
{* optionally display detail information
{if $event.event_details !="" && $event.event_details != "<br />"}
<div class="calendar-details"><span class="calendar-details-title">{$lang.details}: </span>{$event.event_details}</div>
{/if}
*}
<p style="margin-top:12px">
<a style="text-decoration:none;color:#98a677" href="{$event.url}">more details »</a></p>
</div>
<div style="border-bottom: 1px dashed #e11831;padding-bottom:10px;"> </div>
{/foreach}
{else}
<div style="border-top: 1px dashed #e11831;padding-bottom:7px;margin-top:17px"> </div>
<p><em>There are currently no events.</em></p>
<div style="border-bottom: 1px dashed #e11831;padding-bottom:7px;"> </div>
{/if}
<div style="border-top: 2px solid #f0f0f0; padding:8px;margin-top:30px">
{if isset($navigation)}
{if isset($navigation.prev)}<a style="font-size:11px;text-transform:uppercase;float: left;text-decoration:none" href="{$navigation.prev}">{$lang.prev}</a>{/if}
<span style="padding-left:25px;color: #e11831;font-size:11px;text-transform:uppercase;"><a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=1&mb064creturnid=103&page=103
">Jan</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=2&mb064creturnid=103&page=103
">Feb</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=3&mb064creturnid=103&page=103
">March</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=4&mb064creturnid=103&page=103
">Apr</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=5&mb064creturnid=103&page=103
">May</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=6&mb064creturnid=103&page=103
">Jun</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=7&mb064creturnid=103&page=103
">Jul</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=8&mb064creturnid=103&page=103
">Aug</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=9&mb064creturnid=103&page=103
">Sep</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=10&mb064creturnid=103&page=103
">Oct</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=11&mb064creturnid=103&page=103
">Nov</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=12&mb064creturnid=103&page=103
">Dec</a></span>
{if isset($navigation.next)}<a style="color: #685e47;font-size:11px;text-transform:uppercase;float: right;padding-top:0px;margin-top:0px;text-decoration:none" href="{$navigation.next}">{$lang.next}</a></span>{/if}
{/if}
</div>
<P></p>
<P></p>
{if $return_url != ""}
<div class="calendar-returnlink" style="clear:both;padding-top:25px">{$return_url}</div>
{/if}
</div>
Code: Select all
<h2 style="font-size:23px;margin-top:20px">{$event.event_title}</h2>
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {$event.event_date_start|date_format:"%a %e %b %G"}<br/>
{else}
{if $event.event_date_start|date_format:"%a %e %b %G" == $event.event_date_end|date_format:"%a %e %b %G"}
<span style="color:#666633;font-weight:bold">{$lang.date}: </span>{$event.event_date_start|date_format:"%a %e %b %G"} <br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%H:%M%P"} - {$event.event_date_end|date_format:"%H:%M%P"}<br/>
{else}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {$event.event_date_start|date_format:"%a %e %b %G"} to {$event.event_date_end|date_format:"%a %e %b %G"}<br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%H:%M%P"} {$lang.to} {$event.event_date_end|date_format:"%H:%M%P"} <br/>
{/if}
{/if}
{if $event.event_summary !="" && $event.event_details ==""}
<div class="firstpara" style="padding-top:20px">{$event.event_summary}</div>
{/if}
{if $event.event_summary !="" && $event.event_summary != "<br />"}
<div class="firstpara" style="padding-top:20px">{eval var=$event.event_summary}</div>
{/if}
{if $event.event_details !="" && $event.event_details != "<br />"}
<div class="description" style="padding-top:20px">{eval var=$event.event_details}</div>
{/if}
<div class="calendar-returnlink;padding-top:25px">{$return_link}</div>
Code: Select all
{if $event.event_category !=""}
<strong>Category:</strong> {$event.event_category}</div>
{/if}
Ideally, I would like it to have an if clause so that if the event is private and closed to the public, e.g. the category is 'Ambassador Members' or 'Staff' then the output would add the sentence '(private event, by invitation only)', e.g.
Category: Staff (private event, by invitation only)
or
Category: Ambassador Members (private event, by invitation only)
But if the category is a public event like 'Music' or 'Fundraising' then there would be no additional sentence and the output would be:
Category: Music
or
Category: Fundraising
I hope that makes sense??
Re: how to show cgcalendar categories??
For some reason dates are not dispayed, but it looks ok on you page so i kept it your way.
Private categories are listed at the top of each template and separated by '|' sign. Private event label - just below it.
EDIT: if event belongs to some categories and at least one of them is "privte", categories will be separated by comma and "private event label" will be added to the end of row.
Test list template. I have also .Used CGSimpleSmarty module for month navigation.
Private categories are listed at the top of each template and separated by '|' sign. Private event label - just below it.
EDIT: if event belongs to some categories and at least one of them is "privte", categories will be separated by comma and "private event label" will be added to the end of row.
Test list template. I have also .Used CGSimpleSmarty module for month navigation.
And here is event template.{assign var='private_events' value='|'|explode:'Staff|Ambassador Members'} {* category list of private event *}
{assign var='label_private_event' value='(private event, by invitation only)'} {* private event label *}
{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}
{if isset($navigation)}
{capture assign='cgcalendar_nav'}
{if isset($navigation.prev)}{$lang.prev}{/if}
{* month navigation *}
{section name='month_navigation' start='1' loop='12'}
{assign var='month_name_short' value='2010-%s-01 00:00:00'|sprintf:$smarty.section.month_navigation.iteration|date_format:'%b'}
{if $month!=$smarty.section.month_navigation.iteration}
{$month_name_short}
{else}
{$month_name_short}
{/if}
{if !$smarty.section.month_navigation.last} | {/if}
{/section}
{* end month navigation *}
{if isset($navigation.next)}{$lang.next}{/if}
{/capture}
{$cgcalendar_nav}
{/if}
{if !empty($events)}
{foreach from=$events key=key item=event}
{$event.event_title}
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
{$lang.date}: {$event.event_date_start|date_format:"%a %e %b %G"}
{else}
{if $event.event_date_start|date_format:"%a %e %b %G" == $event.event_date_end|date_format:"%a %e %b %G"}
{$lang.date}: {$event.event_date_start|date_format:"%a %e %b %G"} Time: {$event.event_date_start|date_format:"%H:%M%P"} - {$event.event_date_end|date_format:"%H:%M%P"}
{else}
{$lang.date}: {$event.event_date_start|date_format:"%a %e %b %G"} to {$event.event_date_end|date_format:"%a %e %b %G"} Time: {$event.event_date_start|date_format:"%H:%M%P"} {$lang.to} {$event.event_date_end|date_format:"%H:%M%P"}
{/if}
{* event categories *}
{if !empty($event.categories)}
{assign var='private_event' value=''}
{assign var='event_categories' value=$event.categories|@array_keys}
{$CGCalendar->Lang('category')}: {', '|implode:$event_categories}
{foreach from=$event_categories item='cat_name'}
{if in_array($cat_name, $private_events)}
{assign var='private_event' value='1'}
{/if}
{/foreach}
{if !empty($private_event)} {$label_private_event}{/if}
{/if}
{* end event categories *}
{/if}
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" || $event.event_details == "
"))}
{$event.event_summary}
{/if}
{* optionally display detail information
{if $event.event_details !="" && $event.event_details != "
"}
{$lang.details}: {$event.event_details}
{/if}
*}
more details »
{/foreach}
{else}
There are currently no events.
{/if}
{if isset($navigation)}
{$cgcalendar_nav}
{/if}
{if $return_url != ""}
{$return_url}
{/if}
{assign var='private_events' value='|'|explode:'Staff|Ambassador Membersi'} {* category list of private event *}
{assign var='label_private_event' value='(private event, by invitation only)'} {* private event label *}
{$event.event_title}
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
{$lang.date}: {$event.event_date_start|date_format:"%a %e %b %G"}
{else}
{if $event.event_date_start|date_format:"%a %e %b %G" == $event.event_date_end|date_format:"%a %e %b %G"}
{$lang.date}: {$event.event_date_start|date_format:"%a %e %b %G"} Time: {$event.event_date_start|date_format:"%H:%M%P"} - {$event.event_date_end|date_format:"%H:%M%P"}
{else}
{$lang.date}: {$event.event_date_start|date_format:"%a %e %b %G"} to {$event.event_date_end|date_format:"%a %e %b %G"} Time: {$event.event_date_start|date_format:"%H:%M%P"} {$lang.to} {$event.event_date_end|date_format:"%H:%M%P"}
{/if}
{/if}
{* event categories *}
{if !empty($categories)}
{assign var='private_event' value=''}
{$CGCalendar->Lang('category')}:
{foreach from=$categories item='one_cat' name='cgcalendar_cats'}
{if in_array($one_cat.category_name, $private_events)}
{assign var='private_event' value='1'}
{/if}
{$one_cat.category_name}{if !$smarty.foreach.cgcalendar_cats.last}, {/if}
{/foreach}
{if !empty($private_event)} {$label_private_event}{/if}
{/if} {* end event categories *}
{if $event.event_summary !="" && $event.event_details ==""}
{$event.event_summary}
{/if}
{if $event.event_summary !="" && $event.event_summary != "
"}
{eval var=$event.event_summary}
{/if}
{if $event.event_details !="" && $event.event_details != "
"}
{eval var=$event.event_details}
{/if}
{$return_link}
Last edited by Peciura on Tue Nov 02, 2010 10:50 am, edited 1 time in total.
Re: [SOLVED] how to show cgcalendar categories??
That is absolutely awesome! thank you so much Peciura!!
Take a look now, it is perfect :)
http://www.stjohnscathedral.com.au/events/events-calendar.html
By the way, I couldn't get the month navigation CGSimpleSmarty code to work but that's ok because it is otherwise perfect. In case you are interested, the error was: string(152) "Smarty error: [in module_db_tpl:CGCalendar;list_list line 22]: syntax error: unrecognized tag 'module_action_link' (Smarty_Compiler.class.php, line 590)".
Also, I made a slight change to the list template (added an {/if}) so here is the list template again in case anyone needs it:
I'm really happy with the results! thank you for your donated time Peciura, you are a legend!
Take a look now, it is perfect :)
http://www.stjohnscathedral.com.au/events/events-calendar.html
By the way, I couldn't get the month navigation CGSimpleSmarty code to work but that's ok because it is otherwise perfect. In case you are interested, the error was: string(152) "Smarty error: [in module_db_tpl:CGCalendar;list_list line 22]: syntax error: unrecognized tag 'module_action_link' (Smarty_Compiler.class.php, line 590)".
Also, I made a slight change to the list template (added an {/if}) so here is the list template again in case anyone needs it:
Code: Select all
<div>
{assign var='private_events' value='|'|explode:'Wedding|Baptism|Funeral'} {* category list of private event *}
{assign var='label_private_event' value='(private event, by invitation only)'} {* private event label *}
<h2 style="text-align:center; text-transform:uppercase;font-size:20px;color:#98a677;">{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}</h2>
<div style="border-bottom: 2px solid #f0f0f0; padding:8px">
{if isset($navigation)}
{if isset($navigation.prev)}<a style="font-size:11px;text-transform:uppercase;float: left;text-decoration:none" href="{$navigation.prev}">{$lang.prev}</a>{/if}
<span style="padding-left:25px;color: #e11831;font-size:11px;text-transform:uppercase;"><a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=1&mb064creturnid=103&page=103
">Jan</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=2&mb064creturnid=103&page=103
">Feb</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=3&mb064creturnid=103&page=103
">March</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=4&mb064creturnid=103&page=103
">Apr</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=5&mb064creturnid=103&page=103
">May</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=6&mb064creturnid=103&page=103
">Jun</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=7&mb064creturnid=103&page=103
">Jul</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=8&mb064creturnid=103&page=103
">Aug</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=9&mb064creturnid=103&page=103
">Sep</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=10&mb064creturnid=103&page=103
">Oct</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=11&mb064creturnid=103&page=103
">Nov</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=12&mb064creturnid=103&page=103
">Dec</a></span>
{if isset($navigation.next)}<a style="color: #685e47;font-size:11px;text-transform:uppercase;float: right;padding-top:0px;margin-top:0px;text-decoration:none" href="{$navigation.next}">{$lang.next}</a></span>{/if}
{/if}
</div>
<p style="padding-top:20px"> </p>
{if !empty($events)}
{foreach from=$events key=key item=event}
<div>
<h2><a style="color: #a6b483;font-size:21px;text-decoration:none" href="{$event.url}">{$event.event_title}</a></h2>
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {$event.event_date_start|date_format:"%a %e %b %G"}<br/>
<span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%I:%M%P"}<br/>
{else}
{if $event.event_date_start|date_format:"%a %e %b %G" == $event.event_date_end|date_format:"%a %e %b %G"}
<span style="color:#666633;font-weight:bold">{$lang.date}: </span>{$event.event_date_start|date_format:"%a %e %b %G"} <br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%I:%M%P"} - {$event.event_date_end|date_format:"%I:%M%P"}<br/>
{else}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {if $event.event_date_start|date_format:"%a %e %b %G"} to {$event.event_date_end|date_format:"%a %e %b %G"}<br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%I:%M%P"} {$lang.to} {$event.event_date_end|date_format:"%I:%M%P"} <br/>
{/if}
{/if}{/if}
{* event categories *}
{if !empty($event.categories)}
{assign var='private_event' value=''}
{assign var='event_categories' value=$event.categories|@array_keys}
<span style="color:#666633;font-weight:bold">{$CGCalendar->Lang('category')}:</span> {', '|implode:$event_categories}
{foreach from=$event_categories item='cat_name'}
{if in_array($cat_name, $private_events)}
{assign var='private_event' value='1'}
{/if}
{/foreach}
{if !empty($private_event)} <span style="font-weight:bold"><em>{$label_private_event}</em></span>{/if}
{/if}
{* end event categories *}
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" || $event.event_details == "<br />"))}
<div class="description" style="padding-top:10px">{$event.event_summary}</div>
{/if}
{* optionally display detail information
{if $event.event_details !="" && $event.event_details != "<br />"}
<div class="calendar-details"><span class="calendar-details-title">{$lang.details}: </span>{$event.event_details}</div>
{/if}
*}
<p style="margin-top:12px">
<a style="text-decoration:none;color:#98a677" href="{$event.url}">more details »</a></p>
</div>
<div style="border-bottom: 1px dashed #e11831;padding-bottom:10px;"> </div>
{/foreach}
{else}
<div style="border-top: 1px dashed #e11831;padding-bottom:7px;margin-top:17px"> </div>
<p><em>There are currently no events.</em></p>
<div style="border-bottom: 1px dashed #e11831;padding-bottom:7px;"> </div>
{/if}
<div style="border-top: 2px solid #f0f0f0; padding:8px;margin-top:30px">
{if isset($navigation)}
{if isset($navigation.prev)}<a style="font-size:11px;text-transform:uppercase;float: left;text-decoration:none" href="{$navigation.prev}">{$lang.prev}</a>{/if}
<span style="padding-left:25px;color: #e11831;font-size:11px;text-transform:uppercase;"><a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=1&mb064creturnid=103&page=103
">Jan</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=2&mb064creturnid=103&page=103
">Feb</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=3&mb064creturnid=103&page=103
">March</a> | <a style="color:#60553d;text-decoration:none" href="index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=4&mb064creturnid=103&page=103
">Apr</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=5&mb064creturnid=103&page=103
">May</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=6&mb064creturnid=103&page=103
">Jun</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=7&mb064creturnid=103&page=103
">Jul</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=8&mb064creturnid=103&page=103
">Aug</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=9&mb064creturnid=103&page=103
">Sep</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=10&mb064creturnid=103&page=103
">Oct</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=11&mb064creturnid=103&page=103
">Nov</a> | <a style="color:#60553d;text-decoration:none" href="http://www.stjohnscathedral.com.au/index.php?mact=CGCalendar,mb064c,default,1&mb064cdisplay=list&mb064ceventtemplate=event&mb064clisttemplate=list&mb064cuse_session=&mb064cyear={$year}&mb064cmonth=12&mb064creturnid=103&page=103
">Dec</a></span>
{if isset($navigation.next)}<a style="color: #685e47;font-size:11px;text-transform:uppercase;float: right;padding-top:0px;margin-top:0px;text-decoration:none" href="{$navigation.next}">{$lang.next}</a></span>{/if}
{/if}
</div>
<P></p>
<P></p><P></p><P></p>
{if $return_url != ""}
<div class="calendar-returnlink" style="clear:both;padding-top:25px">{$return_url}</div>
{/if}
</div>
Re: how to show cgcalendar categories??
beautiful site!
Re: how to show cgcalendar categories??
Thank you blackhawk. Credit goes to Peciura for helping me with the calendar of events categories and also the thumbnails on the home page showing up by category.
Re: how to show cgcalendar categories??
Hi Peciura
You're absolutely right re the month navigation. I didn't have CGSimpleSmarty module installed on my site, duh!
I have now installed it and the navigation with your code works perfectly except for the prev and next buttons. I will follow your instructions as per your PM and post the final template here for others to use.
You're absolutely right re the month navigation. I didn't have CGSimpleSmarty module installed on my site, duh!
I have now installed it and the navigation with your code works perfectly except for the prev and next buttons. I will follow your instructions as per your PM and post the final template here for others to use.
Re: how to show cgcalendar categories??
Prev, Next navigation links do not work simply because "function.displaylist" does not pass template name to links (look to uploaded diff) so you get default template every time press them.
To "fix" that you can:
a. set default template the one you always use
b. manually add param to navigation links (example extracts template name automatically)
To "fix" that you can:
a. set default template the one you always use
b. manually add param to navigation links (example extracts template name automatically)
{capture assign='cgcal_nav_tail'}{'&'};{$actionid}listtemplate={$smarty.template|replace:'module_db_tpl:CGCalendar;list_':''}{/capture}
...
href="{$navigation.prev}{$cgcal_nav_tail}">{$lang.prev}
...
href="{$navigation.next}{$cgcal_nav_tail}">{$lang.next}
...
- Attachments
-
[The extension txt has been deactivated and can no longer be displayed.]
Re: how to show cgcalendar categories??
Thanks again Peciura! Here is the final list template in full working order. To use this code you must name your calendar list template 'list' and your event template 'event'.
Code: Select all
<div>
{assign var='private_events' value='|'|explode:'Wedding|Baptism|Funeral'} {* category list of private event *}
{assign var='label_private_event' value='(private event, by invitation only)'} {* private event label *}
<h2 style="text-align:center; text-transform:uppercase;font-size:20px;color:#98a677;">{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}</h2>
{if isset($navigation)}
{capture assign='cgcal_nav_tail'}{'&'};{$actionid}listtemplate={$smarty.template|replace:'module_db_tpl:CGCalendar;list_':''}{/capture}
{capture assign='cgcalendar_nav'}
<div style="border-bottom: 2px solid rgb(240, 240, 240); padding: 0pt 8px 8px; position: relative; margin-top: 8px;">
{if isset($navigation.prev)}<a style="font-size: 11px; text-transform: uppercase; float: left; text-decoration: none; display: block; position: absolute; left: 0pt; top: 0pt;" href="{$navigation.prev}{$cgcal_nav_tail}">{$lang.prev} </a>
{/if}
{* month navigation *}
<div style="display: block; margin: auto; width: 85%; text-align: center;">
<span style="color: #e11831;font-size:11px;text-transform:uppercase;">
{section name='month_navigation' start='1' loop='13'}
{assign var='month_name_short' value='2010-%s-01 00:00:00'|sprintf:$smarty.section.month_navigation.iteration|date_format:'%b'}
{if $month!=$smarty.section.month_navigation.iteration}
<a style="color:#60553d;text-decoration:none" href="{module_action_link module='CGCalendar' urlonly='1' year=$year month=$smarty.section.month_navigation.iteration display='list' eventtemplate='event' listtemplate='list' use_session='1' }
">{$month_name_short}</a>
{else}
{$month_name_short}
{/if}
{if !$smarty.section.month_navigation.last} | {/if}
{/section}
</span>
</div>
{* end month navigation *}
{if isset($navigation.next)}<a style="color: rgb(104, 94, 71); font-size: 11px; text-transform: uppercase; padding-top: 0px; margin-top: 0px; text-decoration: none; display: block; position: absolute; right: 0pt; top: 0pt;" href="{$navigation.next}{$cgcal_nav_tail}">{$lang.next}</a>
</span>
{/if}
</div>
{/capture}
{$cgcalendar_nav}
{/if}
<p style="padding-top:20px"> </p>
{if !empty($events)}
{foreach from=$events key=key item=event}
<div>
<h2><a style="color: #a6b483;font-size:21px;text-decoration:none" href="{$event.url}">{$event.event_title}</a></h2>
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span> {$event.event_date_start|date_format:"%a %e %b %G"}<br/>
<span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%I:%M%P"}<br/>
{else}
{if $event.event_date_start|date_format:"%a %e %b %G" == $event.event_date_end|date_format:"%a %e %b %G"}
<span style="color:#666633;font-weight:bold">{$lang.date}: </span>{$event.event_date_start|date_format:"%a %e %b %G"} <br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%I:%M%P"} - {$event.event_date_end|date_format:"%I:%M%P"}<br/>
{else}
<span style="color:#666633;font-weight:bold">{$lang.date}:</span>
{if $event.event_date_start|date_format:"%a %e %b %G"} to {$event.event_date_end|date_format:"%a %e %b %G"}<br> <span style="color:#666633;font-weight:bold">Time:</span> {$event.event_date_start|date_format:"%I:%M%P"} {$lang.to} {$event.event_date_end|date_format:"%I:%M%P"} <br/>
{/if}
{/if}
{/if}
{* event categories *}
{if !empty($event.categories)}
{assign var='private_event' value=''}
{assign var='event_categories' value=$event.categories|@array_keys}
<span style="color:#666633;font-weight:bold">{$CGCalendar->Lang('category')}:</span> {', '|implode:$event_categories}
{foreach from=$event_categories item='cat_name'}
{if in_array($cat_name, $private_events)}
{assign var='private_event' value='1'}
{/if}
{/foreach}
{if !empty($private_event)} <span style="font-weight:bold"><em>{$label_private_event}</em></span>
{/if}
{/if}
{* end event categories *}
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" || $event.event_details == "<br />"))}
<div class="description" style="padding-top:10px">{$event.event_summary}</div>
{/if}
{* optionally display detail information
{if $event.event_details !="" && $event.event_details != "<br />"}
<div class="calendar-details"><span class="calendar-details-title">{$lang.details}: </span>{$event.event_details}</div>
{/if}
*}
<p style="margin-top:12px">
<a style="text-decoration:none;color:#98a677" href="{$event.url}">more details »</a></p>
</div>
<div style="border-bottom: 1px dashed #e11831;padding-bottom:10px;"> </div>
{/foreach}
{else}
<div style="border-top: 1px dashed #e11831;padding-bottom:7px;margin-top:17px"> </div>
<p><em>There are currently no events.</em></p>
<div style="border-bottom: 1px dashed #e11831;padding-bottom:7px;"> </div>
{/if}
<div>
{if isset($navigation)}
{$cgcalendar_nav}
{/if}
</div>
<P></p>
<P></p>
{if $return_url != ""}
<div class="calendar-returnlink" style="clear:both;padding-top:25px">{$return_url}</div>
{/if}
</div>
Re: how to show cgcalendar categories??
Wow, i'll get that to work on a site i do. Really nice way to present a calendar... and also a great learning tool for smarty for me.
1000 mercis. A thousand thank you.
1000 mercis. A thousand thank you.