10704 Posts in 2385 Topics by 1763 members
Page: 1 2
|Go to End||Next >|
28 July 2009 at 12:36am
With regards to the Event Calendar
My Sponsor, Category, and Registration bit doesn't work.
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:
<a href="$Event.RegistrationLink"><h3>Event Tickets</h3></a>
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.
28 July 2009 at 3:50am
Can you post your code for your event class?
28 July 2009 at 5:25am
My SS and php file attached
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.
28 July 2009 at 12:26pm
Works perfectly now, Thanks.
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
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.
23 January 2010 at 8:50pm
so in WorkshopHolder.ss this works as expected
but in Workshop.ss
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
Page: 1 2
|Go to Top||Next >|