Problems, need help? Have a tip or advice? Post it here.
14 posts Page 1 of 2
I'm building a website for my client that has a photo-gallery-like page in it. Each member of the photo gallery has an image, title, and a list of key-value pairs representing certain attributes of the picture. I know I can develop the photo gallery using a repeatable region, but how on earth am I going to add a dynamic key-value system within each "photo" without using repeatable regions? For now, I'm going to have to disable some functionality, but I'm going to have to get something relatively decent put together within a week. Any ideas? It also might be important to note that there are three separate "galleries" within this page, each with an identical structure.
Hi Taconut,

Nested repeatable regions, though very useful in certain situations, are not possible due to some technical constrains on how they work in Couch.

I mentioned this in a previous post - I've already tried making nestable repeatable regions and had to give up.

So, I am afraid, we'll have to think of something else to implement the key-value pairs you need.

Could you please post in some concrete examples of those here? Maybe we could find a way of getting them done with whatever functionality we have at our disposal.

Thanks.
Sweet! My page is actually an inventory of engines. In it, there are three categories: Generators, Power Units, and "Specials" (whatever those are). In my page, I put each one of these categories in a div. Within each div is a list of engines. Each engine consists of a picture (which opens up to a lightbox when clicked), a list of key-value elements, and some miscellaneous notes on the engine (which I've formatted as a nicedit). I was going to make the key-value list a repeatable region (as a set of two text fields), but I'm already encasing each type of engine in a repeatable region itself. Could I possibly make a clonable page template for generators, one for power units, and one for specials and then embed those in my main catalog page? How would I go about doing this? If you'd like, I can send you some code. The current layout is pretty modular.
Thanks for the details.

How about using a separate template (e,g. engines.php) for the engines where each engine would be a cloned page of the template?

Define three folders - 'Generators', 'Power Units', and 'Specials'.
Each engine would be assigned to one category.

Editable regions can be defined for the various elements of an engine (e.g. image for the picture, repeatable for the key-value list etc.).

Now on the main catalog page, use cms:pages (with 'masterpage' parameter set to 'engines.php') thrice to output each category (folder) in a separate div.

What do you think? Any problems with this standard approach?
Please let me know.

Thanks.
Ah. So the contents of engines.php should just be one engine? That actually sounds like a really intuitive approach with the folders! I'll try it out.
I finished transferring it to the clonable template style! The workflow feels so professional! I do, however, have a couple questions:

First, I'd like to hide my main inventory page to get rid of clutter. How would I do that? I'm assuming there's some sort of tag or perimeter I have to add.

Second, is it possible to remove the "name" field and/or the "view" button for my template? They just take up space at this point and I think it would make the whole design less confusing if I removed them. It's not really a big issue, though.

You just saved my life here. This layout feels infinitely more streamlined.
I am glad you found the approach useful :)
That, incidentally, is a very standard approach of implementing things in Couch and will work in very many situations - blog, portfolio and so on.

I'd like to hide my main inventory page to get rid of clutter
Please try using the 'hidden' parameter set to '1' in the cms:template tag (it'll hide the template for the admin i.e. site-owner but not for the super-admin).

is it possible to remove the "name" field and/or the "view" button for my template?
No straightforward way, I am afraid. You could try setting thing in the CSS file.
is it possible to remove the "name" field...

viewtopic.php?p=14563#p14563 describes a method.
A site I'm working on requires a guest to select a country, only then does an additional list appear of schools associated with the selected country, and after a school is selected, a list of courses is revealed that is associated to the selected country and school.

I have not yet used related pages so before I read up on it I'd like to know if it would solve my issue or do I also have to create a clonable country.php, and school.php e.tc...
The schools are unique to each country, but some courses can be found in different schools, different countries..

I know the JS bit is beyond the scope of this forum (and site in general) but if anyone has a script to help asynchronously load the data as the user selects a field, I'll really b grateful :)

Thank you.
---
You live many times, but only ever remember your lives.length - 1
---
Image
Hi cholasimmons,

Not sure if this is relevant still for you but I think this is what you might be looking for

http://www.appelsiini.net/projects/chained/demo.html

Regards
Said
14 posts Page 1 of 2
cron