Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
proper way to embed gallery on other page i want to know proper way to embed gallery which i have created in separate page so i can embed it to where ever i want to embed .

this my code gal.php can i embed it to other page because when i do this is the error i get

Error embedding file: /home/gopimysore2/public_html/7heavens/couch/snippets/gal.php

<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Adevenutre Gallery ' clonable='0' 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='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>

<div id="gallery-wrapper">
<h1>Gallery</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: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 height="200" width="200" class=" thumbnail" 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>

<?php COUCH::invoke(); ?>
Don't embed as is. Use this way:
Code: Select all
<cms:pages masterpage='gal.php'>
   <cms:show gg_image />
</cms:pages>
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
2 posts Page 1 of 1