Hello,
I have a request from a client whose site I am maintaining in Couch. This is regarding a list of art exhibitions. Each exhibition is a collection of images, which I output using the repeatable widget.
Now she has requested a new change: to output the images in two separate sections on the front end. The first section will contain all the paintings and the new second section will contain photographs and invites of the show (under a heading Exhibition Memorabilia).
So I decided to add a new dropdown field to the repeatable, with a title called
"Is Exhibition Memorabilia" with 2 options: Yes | No option. I have provided No as the default selected option (since that will include all the paintings).
However, it isn't working as expected.
I have pasted the code below. I'm sure I'm doing something silly; any help will be appreciated.
I have a request from a client whose site I am maintaining in Couch. This is regarding a list of art exhibitions. Each exhibition is a collection of images, which I output using the repeatable widget.
Now she has requested a new change: to output the images in two separate sections on the front end. The first section will contain all the paintings and the new second section will contain photographs and invites of the show (under a heading Exhibition Memorabilia).
So I decided to add a new dropdown field to the repeatable, with a title called
"Is Exhibition Memorabilia" with 2 options: Yes | No option. I have provided No as the default selected option (since that will include all the paintings).
However, it isn't working as expected.
I have pasted the code below. I'm sure I'm doing something silly; any help will be appreciated.
- Code: Select all
<cms:repeatable name='work_each' order='4' stacked_layout='1'>
<cms:editable
name='work_each_img'
label='Work Image'
type='image'
width='1000'
show_preview='1'
preview_width='100'
/>
<cms:editable
name="work_each_memorabilia"
label="Exhibition Memorabilia"
desc="Is this Exhibition Memorabilia?"
opt_values='Please Select=- | No | Yes'
opt_selected='No'
type='dropdown'
col_width='100'
input_width='100'
required="1"
/>
</cms:repeatable>
- Code: Select all
<cms:extends 'base.html' />
<cms:block 'main'>
<cms:if k_is_page>
<cms:if work_each_memorabilia= 'No'>
<cms:show_repeatable 'work_each' >
<div class="show-each">
<img src="<cms:thumbnail work_each_img width='700' />" class="show-img">
</div>
</cms:show_repeatable>
<cms:else />
<h2>Event Photos & Memorabilia</h2>
<cms:show_repeatable 'work_each' >
<img src="<cms:thumbnail work_each_img width='700' />" class="show-img">
</cms:show_repeatable>
</cms:if>
<cms:else />
<!-- This outputs the list view with all the exhibitions -->
</cms:if>
</cms:block>