10378 Posts in 2194 Topics by 1710 members
| Go to End | Next > | |
| Author | Topic: | 1600 Views |
-
Event Calendar - Category, Sponsor problems

28 July 2009 at 12:36am
Hi all,
With regards to the Event Calendar
My Sponsor, Category, and Registration bit doesn't work.
<dl>
<dt>Category: </dt>
<dd>$Event.Category</dd>
<dt>Sponsor: </dt>
<dd>$Event.Sponsor</dd>
</dl>http://www.srmpromotions.com/dj-factory/2009-08-08
You can see at the bottom of the page that it creates the Category and Sponsor, but doesn;t bring in the details from the CMS. I have tried lots of variations of writing this code, including inserting <% control Event %>...<% end_control %>. But as i'm dabbling, and i'm not 100% sure on how the 'control things' work.
I'd like to use the registration field in the CMS to generate a link on the page. So where its says Tickets, i'd like to insert the Registration field there:
<div id="TicketHolder">
<a href="$Event.RegistrationLink"><h3>Event Tickets</h3></a>
</div>
to act as a link for that particular event.
I hope you can get what i'm trying to explain, if anyone can help with this I would greatly appreciate it.
-
Re: Event Calendar - Category, Sponsor problems

28 July 2009 at 3:50am
Can you post your code for your event class?
-
Re: Event Calendar - Category, Sponsor problems

28 July 2009 at 10:41am
If you're on the detail page for the event, you don't need the $Event accessor, since you're not in the Events control like on the calendar view. The difference is that the latter returns DateTime objects, not Event objects.
-
Re: Event Calendar - Category, Sponsor problems

28 July 2009 at 12:26pm
Works perfectly now, Thanks.
-
Re: Event Calendar - Category, Sponsor problems

22 January 2010 at 3:16pm Last edited: 22 January 2010 3:21pm
After reading this, I realised I was editing the Workshop.ss and not the WorkshopHolder.ss and so I was seeing the reverse where by
$Category and $Sponsor was working.However I'm having difficulty in getting the $Location variable to show in the Workshop.ss
I assume it needs to go via another 'accessor'?$Event.Location and $DateTime.Location don't work - but i'm only guessing at what it should be, any hints where to look?
another thing - where is the Location stored in the database, I can't it anywhere in the database via phpMyAdmin
cheers
-
Re: Event Calendar - Category, Sponsor problems

22 January 2010 at 3:53pm
What class is the Location field in?
It's pretty simple.. If you're in <% control Events %>, then anything on the Event subclass needs to be accessed by $Event.Field. Anything on the DateTime subclass can be accessed with just $Field.
But if you're in <% control Event %>, then you can access anything on the Event subclass with just $Field.
-
Re: Event Calendar - Category, Sponsor problems

23 January 2010 at 8:50pm
so in WorkshopHolder.ss this works as expected
<dt>Category: </dt>
<dd>$Event.Category</dd>
<dt>Sponsor: </dt>
<dd>$Event.Sponsor</dd>
<dt>Location:</dt>
<dd>$Location</dd>
</dl>but in Workshop.ss
<dt>Category: </dt><dd>$Category</dd>
<dt>Sponsor: </dt><dd>$Sponsor</dd>
<dt>Location: </dt><dd>$Location</dd>only the Category and Sponsor values are showing
As far as I can tell from your previous post the Location is part of the DateTime class and should show.
I've tried $WorkshopDatetTime.Location and $Event.Location and $DateTime.Location and $Location and it doesn't show up, but the value does show on the WorkshopHolder page so it must be set (although I can't find it anywhere in the tables via phpMyAdmin - is it stored as a hash or something in memory due to the addTableFields function?).
Workshop.ss is an exact copy of CalendarEvent.ss except for the above 3 lines in it.
I'm using v88 of the event calendar on ss v 2.3.4
thanks for your patience
| 1600 Views | ||
| Go to Top | Next > |


