Forum for discussing general topics related to Couch.
15 posts Page 2 of 2
Try this:
Code: Select all

<cms:folders masterpage='portfoliogallery.php' include_custom_fields='1'>

    <cms:pages folder=k_folder_name limit='1' orderby='publish_date' order='desc'>
        <cms:set first_image_in_folder = gg_image scope='global' />
        <cms:set first_image_in_folder_thumb = gg_thumb scope='global' />
        <cms:set first_image_in_folder_title = k_page_title scope='global' />
    </cms:pages>

    <div class="iso-box <cms:show tags /> col-lg-4 col-md-4 col-sm-4 col-xs-6" style="border-right: 2px solid #000000; border-bottom: 2px solid #000000; border-top: 2px solid #aa7f4d; border-left: 2px solid #aa7f4d;">
        <div style="overflow: hidden; height: 0; padding-bottom: 70%;">
            <a href="<cms:show first_image_in_folder />"
               data-lightbox-gallery="<cms:show first_image_in_folder />"
               title="<cms:show first_image_in_folder_title />" >
                <img src="<cms:show k_folder_image />"
                     style="width: 120%; height: auto; display: block; margin: auto auto;"
                     class="img-responsive"
                     alt="<cms:show k_folder_title />" >
            </a>
        </div>
    </div>
</cms:folders>


Help the helpless :)
Nope, that didn't work either, doesn't show up and the href is blank. I got thinking that maybe if I load the folder image and then get the image list to load below just as links with the same rel, it might work, so that's what I'm working on now.
</code girl>
Bartonsweb wrote: You can call pages anywhere using the cms:pages tag.

Inside of your folders call


Place a pages call:
Code: Select all
<cms:pages folder=k_folder_name >
...Code to show your image e.g. <cms:show gg_image />
</cms:pages>


I think this is getting me the closest to where I want to be, but that doesn't seem to be displaying the right page.

This:
Code: Select all
 <cms:pages folder=k_folder_name >
              <a href="<cms:show gg_image />" data-lightbox-gallery="<cms:show k_page_foldername/>" title="<cms:show my_desc/>"></a>
           </cms:pages>


results in this:
Code: Select all
<a href="" data-lightbox-gallery="" title=""></a>
</code girl>
Got it! Thanks Bartonsweb, you got me headed in the right direction. It's not a perfect fix, but I've added this to the bottom of the page, and it loads the list of all the images uploaded to this page of folders. Since I've got the folder name set for the lightbox rel, it still lets me scroll through the lightbox with the proper galleries set.

The finished code, at the bottom of the page:
Code: Select all
 <cms:pages masterpage='portfoliogallery.php' folder='k_page_foldername' include_subfolders='0' limit='18' paginate='1'>
<a href="<cms:show gg_image />" data-lightbox-gallery="<cms:show k_page_foldername/>" title="<cms:show my_desc/>"></a>
</cms:pages>


Take a look at the working product: http://illustrationfixations.com/indext ... #portfolio
</code girl>
Slight tweak and it's perfect. I'm going to use this for all of my portfolio sites!

Code: Select all
<cms:folders masterpage='portfoliogallery.php' include_custom_fields='1'>
   <div class="iso-box <cms:show tags /> col-lg-4 col-md-4 col-sm-4 col-xs-6" style="border-right: 2px solid #000000; border-bottom: 2px solid #000000; border-top: 2px solid #aa7f4d; border-left: 2px solid #aa7f4d;">
       <div style="overflow: hidden; height: 0; padding-bottom: 70%;">      
            <a href="<cms:show k_folder_image />" data-lightbox-gallery="<cms:show k_folder_name/>" title="<cms:show my_desc/>">
               <img src="<cms:show k_folder_image />" style="width: 120%; height: auto; display: block;
   margin: auto auto;" class="img-responsive" alt="<cms:show k_folder_title />" >
            </a>
       </div>      
    </div>
    <cms:pages masterpage='portfoliogallery.php' folder=k_folder_name include_subfolders='0' limit='18' paginate='1'>
      <a href="<cms:show gg_image />" data-lightbox-gallery="<cms:show k_page_foldername/>" title="<cms:show my_desc/>"></a>
   </cms:pages>
</cms:folders>


Thing of beauty http://illustrationfixations.com/indext ... #portfolio
</code girl>
15 posts Page 2 of 2