Calendar Event Attribute

Permalink 1 user found helpful
Hi There
Can anyone point me in the right direction. I an trying to find out how to set up the calendar & event addon in C5.8.3.2. When trying to add calendar that has "create and link to "more details" Page another dropdown appears "Calendar Event Attribute" but has nothing to select and I cant figure out how to create a "Calendar Event Attribute" to select. Are there any tutorials or explanations what and how this works. I have attached a screenshot to show what I mean

Thanks for any help
Jon

1 Attachment

JonRimmer
 
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
Did you already create attributes under the Calendar attributes page?

I just tried doing this myself, but got the same result. I think this may be a bug.
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
UPDATE! Ok, this is definitely a bug. It's reported here:
https://www.concrete5.org/developers/bugs/8-3-2/impossible-to-add-at...
JonRimmer replied on at Permalink Reply
JonRimmer
Yeah I tried everything I could to get a calendar event attribute to appear but no joy. So as you say it must be a bug of some sort. Thanks for getting back with your thoughts so fast and reporting the bug
MrKDilkington replied on at Permalink Reply
MrKDilkington
@JonRimmer

The Calendar Event Attribute select drop-down is a list of existing Calendar Event page attributes.
Dashboard > Pages & Themes > Attributes > Choose Type > Calendar Event

After a Calendar Event page attribute is created and selected as the Calendar Event Attribute, it will be applied to each event page created. The value of the attribute will be the event and the event's calendar.

You can use the Calendar Event page attribute to display the event details using the Calendar Event block. One way to do this is creating a page type that has a Calendar Event block with "Mode" set to "Page – Display details about the event attached to a custom attribute." and "Retrieve Event from Attribute" set to the Calendar Event page attribute. In your calendar details, you would use this page type for creating "More Details" event pages. This would allow you to click on an event in the calendar and be taken to the event page where the event details would be displayed.
JonRimmer replied on at Permalink Reply 1 Attachment
JonRimmer
Thanks for this but this refers to setting up categories attributes to filter events. Which I have no problem creating/editing.

My question referred to the process of setting up a calendar and you select the option "Create and link to a new "More details" page" from the Enable Additional Event Details dropdown, which gives you a dropdown Calendar Event Attribute. (see attached image). How to do I create a calendar event attribute that will appear in the dropdown? A step by step guide would be helpful as I have tried adding a page attribute call calendar event attribute and added an event attribute to it but not appears in the dropdown.

hope this makes sense
MrKDilkington replied on at Permalink Reply
MrKDilkington
@JonRimmer

I updated my previous reply.
JonRimmer replied on at Permalink Reply
JonRimmer
I think I understand now and have got a page type that can call up data from attributes. Really appreciate your help and patience with this.

If I have done it correctly the page type can only pull data from an event that has been already set up in the calendar. i.e I create an event in the calendar in the dashboard and then use the event page type to create a page that pulls the event detail from the calendar. Is there a way to create an event when you create the page and the event is added to the calendar?

Again thats for your help, much apprciated
MrKDilkington replied on at Permalink Reply
MrKDilkington
@JonRimmer

I don't think an event can be created that way.
blue1295 replied on at Permalink Reply
blue1295
Looking forward to using the calendar block. I've followed your instructions on how to get the calendar event attribute to appear and have been successful. I created a randomly named calendar attribute underneath Dashboard > Pages & Themes > Attributes > Choose Type > Calendar Event. I’m still trying to figure out how the calendar blocks work but my goal is for each event to have a separate page displaying it’s details.

1. Do I need to create a new page type for the calendar events to display? If so, are pages automatically created when I add an event or do I need to add a new page before/after new events I add to the calendar?

2. How do you get the Calendar Event block to display information? I have followed your instructions of inserting a Calendar Event block set to "Page – Display details about the event attached to a custom attribute” and put the Calendar Event page attribute to and "Retrieve Event from Attribute". But the block is blank and doesn’t display information.
tduncandesign replied on at Permalink Reply
tduncandesign
The Calendar Event Attribute select drop-down is a list of existing Calendar Event page attributes.
Dashboard > Pages & Themes > Attributes > Choose Type > Calendar Event


^^^^ Most Helpful! Thanks!
simonchilton replied on at Permalink Reply
simonchilton
I think there's a bug to do with how you create the Calendar Event attribute.

You MUST add it to a set at the point of creation - adding it to a set afterwards doesn't work.

1. Go to Dashboard > Pages and Themes > Attributes
2. Add Attribute > Choose Type > Calendar Event
3. Give your attribute a name and a handle
4. YOU MUST ADD TO A SET NOW - I chose Navigation and Indexing

Your attribute should now be available when adding a new Calendar.
JonRimmer replied on at Permalink Reply 1 Attachment
JonRimmer
Also with the calendar (if you see my screenshot attached) Each event displayed on the calendar block on the front end is showing time before title of the event but only showing 2 digits and one letter of the pm/am i.e. 12p or 6p. I have tried to find where the issue is but now joy. Any help would be great

Thanks
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
@JonRimmer

The default time format depends on the locale, but you can override it using a custom block template. In the custom block template you would add a "timeFormat" property option with the time format you prefer.

Steps to override the default calendar timeFormat:
- copy view.php
concrete\blocks\calendar\view.php
- navigate to application\blocks and create a folder called "calendar"
application\blocks\calendar
- inside the "calendar" folder, create a folder called "templates"
application\blocks\calendar\templates
- paste view.php into the "templates" folder
application\blocks\calendar\templates\view.php
- rename view.php to "custom_time_format.php"
application\blocks\calendar\templates\custom_time_format.php
- open custom_time_format.php and look for the .fullCalendar() method call
- directly below the .fullCalendar() method call, paste in the "timeFormat" option and value
timeFormat: 'hh:mma',

- after pasting the timeFormat option and value, the top portion of the .fullCalendar() method call should look like this
$('div[data-calendar=<?=$bID?>]').fullCalendar({
    timeFormat: 'hh:mma',
    header: {

- you can now apply the Custom Time Format custom block template to your Calendar block to display the custom time

Example time format values:
timeFormat: 'H(:mm)', // 22:30 or 23
timeFormat: 'h(:mm) t', // 10:30 p or 11 p
timeFormat: 'h(:mm)t', // 10:30p or 11p
timeFormat: 'h:mm', // 10:30 or 11:00
timeFormat: 'hh:mma', // 10:30pm or 11:00pm
timeFormat: 'hh:mm a', // 10:30 pm or 11:00 pm
timeFormat: 'hh:mmA', // 10:30PM or 11:00PM
timeFormat: 'hh:mm A', // 10:30 PM or 11:00 PM

Setting a timeFormat property option will affect all views.
https://fullcalendar.io/docs/text/timeFormat...
The time format can also be set on a per view basis.
https://fullcalendar.io/docs/views/View-Specific-Options/...
JonRimmer replied on at Permalink Reply
JonRimmer
Thanks for this, That has sorted the format so the time now shows pm and am in full. Thanks for the clear instruction
mesuva replied on at Permalink Reply
mesuva
When I had a play with the calendar the other day I found I had to create a _page_ attribute of the type 'Calendar Event'. Then I could pick that in the calendar set up and it worked as expected.

So I don't think this is a functional bug as such, it's really that there's no default attribute of this type set up in the initial install for convenience - this definitely confused me. Maybe it's supposed to be there but it fails to install.