Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi there,

I have couch 1.4 running on a new site which is noct yet online.
I used the feateure gallery to implement a Photo-Gallery.

I used the template and settimgs in the doco to get it working. It works fine.

Some questions are left.

1st
How can I change the order of the uploaded images - after they are uploaded manually ?
I mean - how can I set up the order in which they are diasplayed in the gallery ?

2nd
How can I implement on the snippet where a clicked image is displayed a prev and next button so you could directly go to the next/prev image to display ?

my actual page-code for the gallery:

Code: Select all
<cms:template title='Bilder' clonable='1' dynamic_folders='1' gallery='1'>

   <cms:editable name='gg_image'   type='image'        required='1'  order='1'  label='Bild'       width="500" show_preview='1' preview_height='200'/>
   <cms:editable name='gg_thumb'   type='thumbnail'     required='1'  order='2'  label='Thumbnail'    desc="Vorschaubild"      assoc_field="gg_image"
      width='115'   height='115'    enforce_max='1' />
   <cms:editable  name='my_thumb_2' label='Vorschaubild 2'  order='3' desc='Second thumbnail of the main image above'  width='260'       height='260'
            assoc_field='gg_image'  show_preview='1'    type='thumbnail' preview_height='130'    />

</cms:template>

<html>

   <body>

      <div id='content'>
      <div id="gallery-wrapper">
         <h1>Bilder</h1>

         <div id="breadcrumbs">
            <cms:breadcrumbs separator='&nbsp;&raquo;&nbsp;' include_template='1'/><cms:if k_is_page>&nbsp;&raquo;&nbsp;<cms:show k_page_title /></cms:if>
         </div><!-- breadcrumbs -->

         <cms:if k_is_list >

            <!-- gallery folders -->
            <cms:ignore>
               NOTE: A few points to note about the way folders are displayed -
               1. We display only the immediate child folders of the current folder (root is also considered a folder).
               If the images in the current folder are numerous enough to need pagination, we take care to display the folders
               only on the first page.
               2. If the folder has an image associated with it (via the 'Manage folders' admin section), that image is used.
               If no image is associated, we pick up the first page contained within this folder and use its thumbnail.
               Finally if there are no child pages within, we use a default folder icon.
            </cms:ignore>

            <cms:set my_page="<cms:gpc 'pg' method='get' />" />
            <cms:if my_page lt '2' >
               <ul class="gallery folders">
                  <cms:folders childof=k_folder_name hierarchical='1' depth='1'>

                     <cms:set my_folder_image="" />
                     <cms:if k_folder_image>
                        <cms:set my_folder_image=k_folder_image />
                     <cms:else />
                        <cms:pages folder=k_folder_name include_subfolders='0' limit='1'>
                            <cms:set my_folder_image=my_thumb_2 scope='parent' />
                        </cms:pages>
                     </cms:if>
                     <cms:if my_folder_image=''><cms:set my_folder_image="<cms:show k_admin_link />theme/images/empty-folder.gif" /></cms:if>

                     <li>
                        <a href="<cms:show k_folder_link />">
                           <img alt="<cms:show k_folder_title />" src="<cms:show my_folder_image />"/>
                           <span class="title"><cms:show k_folder_title /></span>
                           <span class="count_images"><cms:show k_folder_totalpagecount /> images</span>
                           <span class="count_folders"><cms:show k_folder_totalchildren /> folders</span>
                        </a>
                     </li>
                  </cms:folders>
               </ul>
            </cms:if>

            <!-- gallery images-->
            <ul class="gallery">
               <cms:pages folder=k_folder_name include_subfolders='0' limit='9' paginate='1'>
                  <li>
                     <a href="<cms:show k_page_link />">
                        <img alt="<cms:show k_page_title />" src="<cms:show my_thumb_2 />"/>
                     </a>
                  </li>

                  <cms:if k_paginated_bottom ><!-- pagination -->
                     <div style="clear:both"><cms:paginator /></div>
                  </cms:if>

               </cms:pages>
            </ul>

         <cms:else /><!-- k_is_page -->

            <div id="image_container">
               <img alt="<cms:show k_page_title />" src="<cms:show gg_image />"/>
            </div>

         </cms:if>

      </div><!-- gallery-wrapper -->
   </div>


      <div id='footer'>....</div>


   </body>

</html>
<?php COUCH::invoke(); ?>

with kind regards
Stefan
Hi Stefan,

Replying to your queries -
1. By default the uploaded images are sorted by in descending order of their publish_date, which with images translates to listing first the image that gets uploaded later. I am afraid, there is no other current way of ordering the images in the admin-panel (apart from tweaking the publish dates manually).

2. For "next", "prev" links please see viewtopic.php?f=8&t=7087

Hope this helps.
thanks for your fast reply.

I manipulated the publish-date for an image after uploading. It takes a while for the changes to display. Is there a trick that the update/change would work faster ?

For next/prev I will check the link.

Thank's a lot. ;)
with kind regards
Stefan
3 posts Page 1 of 1
cron