This is a really useful feature for clients, as it can offer an auto-updating selection within a dropdown list. It is documented fully by KK here: http://www.couchcms.com/forum/viewtopic.php?f=4&t=1671&p=2483&hilit=dynamic%3D%27opt_values%27#p2483
I am doing a site for a Festival which has a page listing the venues and a page listing events. I used it so that when the client adds a new venue, the new venue name automatically becomes an option within the venue dropdown list when they create a new event.
Editable region within events.php:
list_venues.html in snippets folder:
I am doing a site for a Festival which has a page listing the venues and a page listing events. I used it so that when the client adds a new venue, the new venue name automatically becomes an option within the venue dropdown list when they create a new event.
Editable region within events.php:
- Code: Select all
<cms:editable
name="event_venue"
label="Venue"
desc="Select one from these"
opt_values='list_venues.html'
dynamic='opt_values'
type='dropdown'
order='25'
/>
list_venues.html in snippets folder:
- Code: Select all
<cms:pages masterpage='venue_details.php'>
<cms:show k_page_title />|
</cms:pages>