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

I am trying to do the photo gallery and add it into my clients website

I am following the following tutorial

http://www.couchcms.com/docs/concepts/p ... llery.html

I have made the template page called gallery.php, the code is below

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

<?php
$title = "Gallery";

$pgDesc="";

$pgKeywords="";

include ( 'includes/header.php' );
?>
<!--CONTENT-->

<cms:pages masterpage="gallery.php" include_subfolders='0' >
   <a href="<cms:show gg_image />">
      <img src="<cms:show gg_thumb />" title="<cms:show k_page_title />" />
   </a>
</cms:pages>

<div style="clear: both;"></div>
<div style="margin: 145px 0 0 0;"></div>
<!--CONTENT-->

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


The gallery page is not showing in the admin cms side though, im not sure where I am going wrong, can anyone help please as would love to get this working

What am I missing or am I missing any files?

Thank you in advance

Kind regards

Ian
I finally got the gallery page displayed in the list on the admin cms side and have managed to upload the thumbnail images but when clicking on them in the front end of the website, it dont enlarge as a popup, it just opens up the enlarged image rather than not a popup so it overlays the page if that makes sense

The url is http://www.sweetzandtreatz.co.uk/gallery.php if someone could take a look please if ok, would really appreciate it as am close now with it

I am using the slimbox2, I have checked the js and is pointing to the right location on my web server and also checked the jquery version and is the same as the downloaded file is - see bwlow

Code: Select all
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="<cms:show k_site_link />js/slimbox2.js"></script>

<link rel="stylesheet" href="<cms:show k_site_link />css/slimbox2.css" type="text/css" media="screen" />


Them lines of code are in my includes/header.php file

Thank you in advance

Ian
can anyone help please

I am struggling to see any issue with it

it's like the javascript is not linking to the page for the slimbox 2 to work but is linking ok, I really don't get it?

Please can someone help me with this issue

Kind regards

Ian
Hi Ian,

For slimbox to work, the anchor elements need to have a 'rel' attribute set - something that your code does not have.

Please see the sample gallery implementation that uses slimbox for a comparison -
http://www.couchcms.com/docs/code/galle ... limbox.zip

<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>


Hope this helps.
Hi KK

Thank you so so much

Goes to show having someone else look at coding spots it straight away, spent a good few hours trying to work it out lol

It is working perfect, thank you so much, really appreciate it, thank you again

Kind regards

Ian
5 posts Page 1 of 1
cron