Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi.

I'm quite new to couchcms but I already love it. I've read the tutorials and most auf the documentation but I'm not sure if I've understood everything right.

What I've done so far:

I have created a nested index.php to build my site structure:

Information
- Some Information
- More Information
Manufacturers
Books
- Book Category 1
- Book Category 2
Specialized Dealers

Now I want to create some detail pages for the manufacturer and specialized dealers (both not linked in the navigation) and corresponding overview pages (using couch's list-view). The overview pages are linked in the navigation.

How can I define the different editables for the manufacturers und specialized dealers? Do have to create separate clonded pages for the manufacturers (manufacturers.php) and dealers (dealers.php) and set pointers on them or am I able to use the nested index.php and define the editables "per template"?

The documentation says that the pointers are the only way to get different editables but this would make the whole page much more complex.

Thanks in advance
Stefan
Hello and welcome, Stefan :)

"Nested Pages' are primarily meant to create just menus.
And menus, by definition, only link to the the 'real' pages, right?

For your site, looking at the structure you posted -
Manufacturers
Books
- Book Category 1
- Book Category 2
Specialized Dealers
You should begin with 'manufactures.php', 'books.php' and 'dealers.php' templates. Make then all clonable and use 'folders' for the categories.

This way you can use the regular 'page-view', 'list-view' and 'folder-view' of Couch.
The page can be accessible (with prettyURLs on) as e.g.
- which is exactly what you get if you used nested-pages.
Leave the mested-pages only to create a dynamic menu (if you need one). Don't attempt to create entire site of them as it'd be very constraining.

The standard way of building site using Couch is via separate templates (clonable or otherwise) as explained in our Aurelius tutorial (http://www.couchcms.com/docs/tutorials/portfolio-site/). I suggest you follow the same approach.

Hope this helps.
Hello KK.

Many thanks for your reply. Things are much clearer now :D

I'll try my best and report back later.

edit: One more question:

I can leave the nested page (index.php) untouched and set pointers to manufacturers.php, books.php and so on, right?
Hi again :lol:

Everything works fine ... so far. Now I have a follow up question:

I have to create some kind of database with manufacturers and their products. Each manufacturer has a name, a description and a brand logo. The products on the other hand have a name, one manufacutrer, a description and - in most cases - one or more product images.

By now I have a clonable manufaturers.php and a clonable products.php (without a manufacturer selection). What I want now is a dropdown field which is filled with the existing manufacturers when I create a new product. Or am I able to create the products page as a "subpage" of a manufacturer, to asign the products?

Have a nice day :)
Stefan
Hi Stefan,

What you are looking for is 'relations' (http://www.couchcms.com/docs/concepts/r ... ships.html)

Associate products with manufactures in many-to-one way and you'll get the dropdown showing all manufactures while creating a product.

Place the following definition in products.php, refresh the template as super-admin and you are set to go -
Code: Select all
<cms:editable 
    name='product_manufacturer'
    type='relation'
    has='one'
    masterpage='manufactures.php'
    label='Manufacturer'
/>

Hope this helps.
5 posts Page 1 of 1
cron