by
Faps » Mon Apr 11, 2011 2:28 pm
Yup that was relevant to my previous question.
Ok another issue came up. I have this alternate page view full of thumbnails, I would like to show all the thumbs in the particular folder including all in the group. Not sure how to change the code for the thumbs page.
Here's the code for the editables on work.php
- Code: Select all
<cms:template title='Work' clonable='1'>
<cms:editable name='work_content' type='richtext'/>
<cms:editable name='group_gallery' label='Gallery' type='group'/>
<cms:repeat count='6' startcount='1' >
<cms:editable
name="gallery_img_<cms:show k_count />"
label="Image <cms:show k_count />"
width="500"
height="500"
show_preview='1'
preview_height='200'
group='group_gallery'
type="image" />
<cms:editable
name="thumb_gallery_img_<cms:show k_count />"
assoc_field="gallery_img_<cms:show k_count />"
label="Thumbnail <cms:show k_count />"
desc="Thumbnail of image above"
width='90'
height='90'
group='group_gallery'
type="thumbnail" />
<cms:editable
name="thumb_gallery2_img_<cms:show k_count />"
assoc_field="gallery_img_<cms:show k_count />"
label="Thumbnail2 <cms:show k_count />"
desc="Thumbnail2 of image above"
width='195'
height='90'
group='group_gallery'
type="thumbnail" />
</cms:repeat>
Here's what you gave me for conditionals on work.php:
- Code: Select all
<div class="workimg">
<cms:repeat count='6' startcount='1' >
<cms:set my_img_src="<cms:get "gallery_img_<cms:show k_count />" />" />
<cms:if "<cms:not_empty my_img_src />" >
<div id="photo_<cms:show k_count />" <cms:if k_count != '1'>style="display:none;"></cms:if> ><img src="<cms:show my_img_src />" /></div>
</cms:if>
</cms:repeat>
<ul class="sqthumbs">
<cms:repeat count='6' startcount='1' >
<cms:set my_thumbnail_src="<cms:get "thumb_gallery_img_<cms:show k_count />" />" />
<cms:if "<cms:not_empty my_thumbnail_src />" >
<li><a href="javascript:void(0)" onClick="switch_product_img('photo_<cms:show k_count />', 3);"><img src="<cms:show my_thumbnail_src />" width="90" height="90" alt="" /></a></li>
</cms:if>
</cms:repeat>
</ul>
</div>
Here's my existing code in work_thumbs.html:
- Code: Select all
<div class=contentarea>
<cms:if k_is_folder>
<div class=header>
<img src="images/title_<cms:show k_folder_name/>.png" alt="<cms:show k_folder_title/>" />
</div>
</cms:if>
<div class=thumbgrid>
<ul>
<cms:pages masterpage='work.php' folder=k_folder_name>
<li><a href="<cms:show my_img_src />" rel="lightbox[portfolio]" title="<cms:show k_page_title/>">
<img src="<cms:show thumb/>"/></a></li>
</cms:pages>
</ul>
</div>
</div>