Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
I have a cloned page in a folder. What I want to do is use the <cms:pages> tag to display the other pages that are in the folder at the bottom of the page (like a 'Related Products' section). How would I go about doing this?

I have tried the following code but it loops through all of the cloned pages, not just the ones in the same folder.

I am using dynamic folders if that makes any difference.
Code: Select all
<cms:pages folder='<cms:show k_page_foldername/>'  include_subfolders='0' >
                    <!-- All the variables of each page in this folder are available here -->
                    <div class="aicBox break-mobile">
                        <a href="<cms:show k_page_link/>">
                            <figure>
                                <img src="<cms:show image/>" alt="Product Image">
                                <figcaption><cms:show k_page_title/></figcaption>
                            </figure>
                        </a>
                    </div>
                </cms:pages>
Hi,

Please use double-quotes around the 'folder' parameter's value -
Code: Select all
<cms:pages folder="<cms:show k_page_foldername/>" include_subfolders='0' >

or simply use the following -
Code: Select all
<cms:pages folder=k_page_foldername include_subfolders='0' >

You might also want to exclude the current page from the listing by doing this -
Code: Select all
<cms:pages folder=k_page_foldername page_name="NOT <cms:show k_page_name />" include_subfolders='0' >

Needless to say, we are assuming that the snippets above are being used in a 'page_view'.

Hope this helps.
KK,

Thank you for your solution. The third one was just what I needed and I didn't even ask for it! I appreciate all the time and effort you put into Couch.
You are welcome :)
4 posts Page 1 of 1
cron