Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi

Just a quick one, I have a page that has a photo gallery and is all working on the page but the page has text as well under the gallery and would like to allow the client to edit this text as well within couchcms admin side.

Can a page have a photo gallery and a textarea content box as well on the admin side?

I added in the cms tag to edit the text but is not showing on the admin side on that page, it only shows the photo gallery folders I created and the images inside the folders

Thank you in advance

Can anyone help please as totally stuck on how to do this as I want both the gallery to be editable by the client so they can add their own photos to the folders and also I want the text to be editable by the client as well

the URL is http://www.enchantedbridalboutique.co.u ... sories.php

below is the coding I have so far

Code: Select all
<?php require_once'cms/cms.php'; ?>
<cms:template title='Accessories' clonable='1' dynamic_folders='1' gallery='1'>
   <cms:editable
      name='gg_image'
      label='Image'
      desc='Upload your main image here'
      width='700'
      height='700'
      show_preview='1'
      preview_height='200'
      type='image'
   />
   
   <cms:editable
      name='gg_thumb'
      label='Image Thumbnail'
      desc='Thumbnail of the main image above'
      width='200'
      height='200'
      enforce_max='1'
      assoc_field='gg_image'
      show_preview='1'
      type='thumbnail'
   /> 

   <cms:editable
      name='my_thumb_2'
      label='Image Thumbnail 2'
      desc='Second thumbnail of the main image above'
      width='200'
      height='200'
      assoc_field='gg_image'
      show_preview='1'
      type='thumbnail'
   /> 
   
   <cms:editable
      name='my_desc'
      label='Description'
      height='60'
      type='textarea'
   />
               
</cms:template>

<?php
$title = "Enchanted Bridal Boutique Accessories Gallery";

$pgDesc="";

$pgKeywords="";

include ( 'includes/header.php' );
?>

   <div class="main">
      <div class="wrap">
         <div class="heading">
           
            <h3>Accessories Gallery</h3>
         </div>
      
        <div class="section group">
           
            <div id="gallery-wrapper">
           
            <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: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='18' paginate='1'>
            <li>
               <a href="<cms:show gg_image />" rel="lightbox-<cms:show k_page_foldername/>" <cms:if my_desc>title="<cms:show my_desc/>"</cms:if>>
                  <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>
            
                <br /><br />
               
                <p>
                Accessories are the final addition on any bride-to-be and you can choose from a great range here at Enchanted Bridal Boutique.
<br /><br />
Richard Designs
<br /><br />
Starlet Jewellery &amp; Tiaras
<br /><br />
June Koch Bespoke Jewellery
<br /><br />
Tiaras
<br />
The classic beautiful tiara has been a true favourite for centuries, it will add grace and beauty to any hairstyle, from loose long curls to short and hair up styles, a tiara will make you feel like a true princess.
<br /><br />
Headbands
<br />
Complete your wedding dress with a full or side headband, choose from a wide range of styles, from full embellishment like crystals and pearls to subtle patterns, if you have a stunning simple dress then a headband may be just what is needed to set it off.
<br /><br />
Hair combs
<br />
These are particularly effective when you wear your hair up, they can be worn in many ways , whether to hold your hair back, or around a loose bun or even on a veil,  they are easy to wear and come embellished or plain.
<br /><br />
Veils
<br />
From light throw overs to something more elaborate like a Cathedral style, the veil finishes of the entire look and we will help you find the perfect one to compliment your dress.
               </p>
               
            <div class="clear"></div>

     </div>
   </div>
   
<?php include( 'includes/footer.php' ); ?>
<?php COUCH::invoke(); ?>


UPDATE: I have used the caption textarea for now in globals.php
Hi,

Defining an editable region in the gallery template will make that region available for *each* photo (i.e. cloned page in gallery).
You actually wish to have the region associated with the complete gallery.

To that, we need to use a separate template (e.g. globals.php) - so the solution you came up with is the correct one.
Hi KK

Thank you for the reply

That's good am learning couchcms and I should look at the documentation first before posting
3 posts Page 1 of 1
cron