Reputation: 11
I am developing a dynamic calendar application within a Sitecore instance, and the User case would be..
1. Creation of Event (from and Event
Template),
2. Choose multiple dates, and multiple sessions on that date from within the creation of that Event
item.
My question is simply...
Using an
Event
Template, is it even possible to create multiple and even dynamic fields for the Content Author to choose from ?
(I am mostly looking to learn if Sitecore has the capacity and if so how)
Upvotes: 1
Views: 622
Reputation: 7994
Your question specifically asks if you can have dynamic fields on the template, which implies you would want separate field names for each date created by the user. My understanding is that you cannot do that with a single template as the field definitions are at the template level and you likely don't want to have the authors changing each other's events.
If individual field names is not a requirement, I do believe that with a custom field type you could likely achieve something similar.
The built-in date picker control allows users to select a single date which it then stores in what is essentially a text box. If you extended this control to allow for multiple insertions and removal of existing values, you could store a complex list on your Event. I'd imagine you'd want to almost have something like the multi-select box (for removing and re-ordering) but that the input would be your date control.
Alternatively, you could use a 'child item' approach where you create the items as children below the created event. This is a much more 'out-of-the-box' approach.
Finally, you could also use a command template where the user creates an 'Event', but what they are actually doing is creating a new item from a custom 'Event' template. You can then have the user extend their individual event template as needed using the out-of-the-box builder functionality. However, this is going to explode your template definitions and reeks of giving too much admin access to the authors.
Upvotes: 2