Hi

Can videos be uploaded to the photo gallery page so on the gallery.php page, it can have a mix of photos/images and videos on the same page or does the videos need to be on a seperate page?

My current code is below

Code: Select all
<?php require_once( 'cms/cms.php' ); ?>

<cms:template title='Gallery Page' clonable='1' dynamic_folders='1' gallery='1' order='4'>

    <cms:editable
                  name='gg_image'
                  label='Image'
                  desc='Upload your main image here'
                  width='500'
                  height='500'
                  quality='100'
                  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'
                  quality='100'
                  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='100'
                  height='100'
                  quality='100'
                  assoc_field='gg_image'
                  show_preview='1'
                  type='thumbnail'
                  /> 

    <cms:editable
                  name='my_desc'
                  label='Description'
                  height='60'
                  type='textarea'
                  />

</cms:template>

<section class="gallery-page pt-0">
    <div class="container">
        <div class="row">

            <cms:if k_is_list >

                <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-->
                <div class="col-xl-12 col-lg-12 col-md-12">
                    <div class="gallery-page__single">
                        <div class="gallery-page__img">
                            <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>
    </div>
    </div>   

</div>
</div>

</section>

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