CGCalendar custom field call
Posted: Tue Oct 29, 2013 12:31 pm
Hello everyone!
I've been playing with CGCalendar for awhile and on my testpage situation looks like this:
- On my starting page there's a list of events from all categories (in summary mode), sorted by date (starting from today);
- A click on event's title gives me detail text of that event.
And there comes my first problem...
Problem No. 1:
I have modified Sample Detail Template but nothing too serious. Now, I don't know how to make the call for an image uploaded via custom field to be displayed in detail view. I would also like to display that image at the very top of detail view and some extra text at the bottom. But I don't know how to split the default call. This is how it looks in the template:
As you can see (you, to whom I envy now on your coding skills
), this call brings all of the custom fields together. My custom fields were named eventimage (file upload field) and extratext (text area field). There is no problem displaying 'extratext' but instead of image, 'eventimage' field gives only the name of uploaded image.
At the end, the Return link of detail event view is not actually a 'link back' but a link to default Calendar page.
Problem No. 2:
The calendar itself... It's in the sidebar, nothing fancy, just plain calendar grid 270x270 px with "prev - Month - next" navigation at the top and the date-grid below. I found nothing on this forum nor documentation related to setting up calendar to work as - let's say - alternative navigation/search. If one clicks on a date, it brings the list of events for that day within the calendar area and the calendar-grid in main content area (which means we're back on the "Default Calendar Page" again...). But I would like to call for that events-list in main content area while the calendar remains in it's grid view in the sidebar.
I'm just a designer and my coding skills are not up to this so I could really use some help! I'll apprecieate any idea or direction on how to solve this issue. Thank you in advance!
Regards,
Jakovbak
I've been playing with CGCalendar for awhile and on my testpage situation looks like this:
- On my starting page there's a list of events from all categories (in summary mode), sorted by date (starting from today);
- A click on event's title gives me detail text of that event.
And there comes my first problem...
Problem No. 1:
I have modified Sample Detail Template but nothing too serious. Now, I don't know how to make the call for an image uploaded via custom field to be displayed in detail view. I would also like to display that image at the very top of detail view and some extra text at the bottom. But I don't know how to split the default call. This is how it looks in the template:
Code: Select all
{* Display custom fields
There are two ways to address custom fields
1) {$event.fields.fieldname}
2) {foreach from=$event.fields key='fieldnamee' item='fieldvalue'}
{$fieldname}: {$fieldvalue}
{/foreach}
You may want to use the former method with file upload fields.
*}
<div class="calendar-fields">
{foreach from=$event.fields key='fieldname' item='fieldvalue'}
<!-- {$fieldname}: -->{$fieldvalue}<br/>
{/foreach}
</div>

At the end, the Return link of detail event view is not actually a 'link back' but a link to default Calendar page.
Problem No. 2:
The calendar itself... It's in the sidebar, nothing fancy, just plain calendar grid 270x270 px with "prev - Month - next" navigation at the top and the date-grid below. I found nothing on this forum nor documentation related to setting up calendar to work as - let's say - alternative navigation/search. If one clicks on a date, it brings the list of events for that day within the calendar area and the calendar-grid in main content area (which means we're back on the "Default Calendar Page" again...). But I would like to call for that events-list in main content area while the calendar remains in it's grid view in the sidebar.
I'm just a designer and my coding skills are not up to this so I could really use some help! I'll apprecieate any idea or direction on how to solve this issue. Thank you in advance!
Regards,
Jakovbak