Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Sorry about the title, struggled to word this right for the issue / what I want to achieve.

Basicall I have a simple product catalogue (no selling) that I want to provide a visitor experience as follows:

1. User clicks "Collections" from the main menu and are shown the "collections" folders with image and description, they click the "view collections (k_folder_link).
2. The user is presented with the list of products in this folder (collection) with a link to view "k_page_link"
3. User is on the single product page with the full information of said product.

Now I am trying to work out how to get my conditionals working for this.

Im using template partials in my "embeds" (renamed snippets) folder and my collections.php looks like this:


Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template clonable='1' nested_pages='0' title='Collections' dynamic_folders='1'>
<cms:editable type='group' name='overview' label='Product Overview' order='1' />
<cms:editable type='richtext' name='short_description' label='Short Description' group='overview' />
<cms:editable type='image' name='product_thumb' label='Product Thumb' group='overview' />
</cms:template>

<cms:if k_is_folder>
<cms:embed 'collections_list.tpl' />
<cms:if elseif k_is_page />
<cms:embed 'collections_page.tpl' />
<cms:else />
<cms:embed 'collections.tpl' />
</cms:if>

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


If works to the point of trying to get into the "single" product page.
Think I have this solved thanks to the docs (didn't find this with the search terms I originally tried).

[url]http://www.couchcms.com/docs/concepts/listing-pages.html
[/url]
This works:

Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template clonable='1' nested_pages='0' title='Collections' dynamic_folders='1'>


<cms:editable type='group' name='overview' label='Product Overview' order='1' />

<cms:editable type='richtext' name='short_description' label='Short Description' group='overview' />
<cms:editable type='image' name='product_thumb' label='Product Thumb' group='overview' />



</cms:template>


<cms:if k_is_home>

<cms:embed 'collections.tpl' />

</cms:if>

<cms:if k_is_page>

<cms:embed 'collections_page.tpl' />

</cms:if>


<cms:if k_is_folder>

<cms:embed 'collections_list.tpl' />

</cms:if>



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

2 posts Page 1 of 1
cron