Forum for discussing general topics related to Couch.
27 posts Page 3 of 3
deleted
I think using folders would be appropriate (although if you are more comfortable with the idea of using a separate template for each section, even that will do).

Your site structure is roughly like this -
Code: Select all
chf
    kunst
        malstifte
        malen
        wachs
        farbstifte
    wolle
        farbig
        natur
        pflanzen
        locken
        seide

If we follow the dynamic folders method -
The topmost element will be the template itself (i.e. chf.php).
The rest of the hierarchy will be created using folders.

Each product will be a cloned page that would be placed in one of the folders above.

Listing can easily be done using the home-view/folder-view/page-view (http://www.couchcms.com/docs/concepts/views.html).

Please let us know if something is confusing.
deleted
It seems you deleted a previous post of yours where you asked for directions about using folders.
Anyways, here is the answer (though you might have found it out for yourself)

With reference to your site hierarchy illustrated below -
Code: Select all
chf
    kunst
        malstifte
        malen
        wachs
        farbstifte
    wolle
        farbig
        natur
        pflanzen
        locken
        seide

- following are the pages (i.e. distinct URLs) that a visitor can reach
(assuming you eventually turn on prettyURLs)

http://www.yoursite.com/chf/
This is the home-view.
Here you are displaying a list of all your folders with the first-level folders serving only as headings while the second-level folders actually link deeper.

http://www.yoursite.com/chf/wolle/

This is the folder-view of the first-level folder.
In your site this throws 404 error but we'll make it show a list of folders directly below it i.e. all the child second-level folders below it.

http://www.yoursite.com/chf/wolle/farbig/
This is also a folder-view but of a second-level folder.
Here is where the meat of your site lies.
We'll display all the cloned-pages (i.e. products) that reside in this folder.

http://www.yoursite.com/chf/wolle/farbig/mohair.html
This is a page-view showing a product.
Your site does not show individual products on single pages so we won't implement this view.

With the above information, this is what your template should look roughly like (you can fine-tune the HTML markup).
Code: Select all
<cms:if k_is_home >
    <!-- we'll list all folders of this template -->
    <cms:folders hierarchical='1' depth='2'>
        <cms:if k_level='0'>
            <!-- first level folders need to show only their names -->
            <h2><cms:show k_folder_title /></h2>
        <cms:else />
            <!-- second level folders need to show their photo and link -->
            <a href="<cms:show k_folder_link />"><cms:show k_folder_image /></a>
            <a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a>
        </cms:if>
    </cms:folders>
</cms:if>

<cms:if k_is_folder >
    <!-- we check for the first level folders by testing if they have a parent (they don't) -->
    <cms:if k_folder_parentid='-1'>
        <!-- first level folder - show its child folders -->
        <h1><cms:show k_folder_title /></h1>
        <cms:folders childof=k_folder_name hierarchical='1' depth='1' >
            <a href="<cms:show k_folder_link />"><cms:show k_folder_image /></a>
            <a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a>
        </cms:folders>
    <cms:else />
        <!-- second level folder - show all products within it -->
        <cms:pages folder=k_folder_name include_subfolders='1' >
            <!-- All the variables of each page (i.e. product) in this folder are available here -->
            <div class="wrapper">
                <!-- place your original code showing a single product here -->
                <h3><cms:show k_page_title /></h3>
            </div>
        </cms:pages>
    </cms:if>
</cms:if>

Hope this helps. Do let me know.
deleted
I agree to what you are planning.
I'd first figure out how many product 'display types' are there and what editable regions each would require.
Next define all the regions as groups (using 'group' type editable region).
Finally, add a dropdown at the very top listing all the groups we created.

This way, while adding a product in the admin panel, you can simply indicate which display group we are using and then add the relevant data in that group.
I don't think hiding the groups is required (they'll already be collapsed in group boxes).

While displaying on the front-end, we can easily check first the value of the dropdown and then render the appropriate group.
I am starting to think that couch isn't really suited for what I am doing

I have studied your site and it is complex because you have handcoded every page and product in almost totally unique fashion. However, I don't see why it couldn't be implemented using Couch.

Anyways, I am afraid, this is all Couch has to offer and what I could do to make it easy for you to port your site.
deleted
27 posts Page 3 of 3