Forum for discussing general topics related to Couch.
16 posts Page 1 of 2
I'm a little confused regarding setting up a portfolio section for my latest project which is a website for a wedding agency. I created simple, unclonable templates separately for each service (e.g. indoor decorations, outdoor decorations, car decorations, wedding bouquets, ....), which led to the following situation:
1. I can't paginate the displayed portfolio items;
2. Future possible problems if the client requires display of archives for old portfolio items or grouping somehow old and recent portfolio items;
3. Problems sorting portfolio items based on repeatable regions. Repeatable regions are great, but so far I have found 2 drawbacks of using them: one regarding search in this regions, which is impossible for the moment and two regarding sorting which is cool using drag and drop, but only useful if dealing a small amount of items. In my case there are dozens of items which should be displayed in descending order (newest at top, oldest at bottom), so every time the client updates his portfolio he most drag and drop new items to the top. That's not very easy if you already have dozens of repeatable regions.
Unfortunately, I realized too late that I'm on the wrong way :(
Now I'm thinking to use another approach, as follows:
Create clonable templates separately for each service, whit dynamic folders on. This will solve problem nr. 1 - pagination, using clonable template; problem nr. 2 - archiving/grouping items, using Folders; and problem nr. 3 - sorting repeatables (every time the client updates his portfolio for one of his services, he will create a new page whose repeatables will be displayed at the top of the displayed items for that service).
Am I right using this approach?

Thanks, Attila
Hi Attila,

In Couch there can be several ways of accomplishing the same thing and, sometimes, it becomes tricky to choose the option that works best for you.

Would it be possible for you to post in screenshots of your HTML mockup showing all the separate sections? If that is not feasible, maybe their wireframes?

Please try to post all relevant sections your site will eventually require and I'm sure we'll be able to zero in on the cleanest approach to handle the project.

Thanks.
Hi, KK

All I can say in addition to previous post is that my menu contains the following options: Home, About, Portfolio, Events, Partners, Contact.
The portfolio page should list the agency's services (photo + service name), whit link to the actually portfolio page for that service (could contain only photo gallery or service description+photo gallery).
My confusion is related to choosing the best approach for creating the portfolio section of the website.

Attila
atisz wrote: Now I'm thinking to use another approach, as follows:
Create clonable templates separately for each service, whit dynamic folders on. This will solve problem nr. 1 - pagination, using clonable template; problem nr. 2 - archiving/grouping items, using Folders; and problem nr. 3 - sorting repeatables (every time the client updates his portfolio for one of his services, he will create a new page whose repeatables will be displayed at the top of the displayed items for that service).
Am I right using this approach?

Thanks, Attila


Unfortunately this won't solve pagination :( I just tried the following code:

Code: Select all
<ul class="gallery_items">
   <cms:pages masterpage='portfolio.php' limit='16' paginate='1' >
      <cms:show_repeatable 'portfolioitems'>                                                                                                            
         <li class="p_items">
            <a href="<cms:show k_page_link/>"><img src="images/gallery-bg.png" alt="" title="" border="0" class="frame" /></a>
            <img src="<cms:thumbnail pitem width='189' height='128' />" alt="" title="" border="0" class="thumb" />
         </li>
      </cms:show_repeatable>
   <cms:paginator />
   </cms:pages>                              
</ul>


This won't show 16 portfolio items as I thought, it will show 16 pages items, so... it doesn't work as expected.
Does anyone have a solution to this?

Thanks, Attila
I keep rereading your posts, but I am still uncertain what you are trying to do. As KK stated, screenshots would help you get the answer you want.

Is there a reason why the following approach is insufficient? Each service is a folder. Each portfolio item is a cloned page. On the home view list all the folders (Services) with a link to their respective folder view. On the folder view list all the cloned pages (portfolio items) of that folder with a link to the cloned pages (portfolio items).
Code: Select all
<cms:template title='Portfolio' clonable='1' dynamic_folders='1' gallery='1'>
   <cms:editable name='gg_image' label='Picture' show_preview='1' type='image'/>
   <cms:editable name='gg_thumb' label='CMS Thumbnail' width='115' height='115' crop='1' assoc_field='gg_image' type='thumbnail'/>
</cms:template>

...

<cms:if k_is_home>
   <ul class="gallery_items">
      <cms:folders>
            <li class="p_items">
               <a href="<cms:show k_folder_link/>"><img src="images/gallery-bg.png" alt="" border="0" class="frame"/></a>
               <img src="<cms:thumbnail k_folder_image width='189' height='128'/>" alt="<cms:show k_folder_title/>" title="<cms:show k_folder_title/>" border="0" class="thumb"/>
            </li>
      </cms:folders>
   </ul>
</cms:if>

<cms:if k_is_folder>
   <ul class="gallery_items">
      <cms:pages folder=k_folder_name limit='16' paginate='1'>
            <li class="p_items">
               <a href="<cms:show k_page_link/>"><img src="images/gallery-bg.png" alt="" border="0" class="frame"/></a>
               <img src="<cms:thumbnail gg_image width='189' height='128'/>" alt="<cms:show k_page_title/>" title="<cms:show k_page_title/>" border="0" class="thumb"/>
            </li>
         <cms:paginator/>
      </cms:pages>
   </ul>
</cms:if>
Hi cheesypoof,

This approach could be a good one, but how do I paginate the cloned pages content (images), which is based on repeatable regions, lets's say 80, 100 or even 180 image (repeatable region)/cloned page to display only 16 image/page? And how can I manage sorting of these pictures, if every time a picture is added it will be displayed at the end of total pictures instead at beginning?
I attach some screenshots too, maybe this way you can figure out what I'm trying to do.

Attachments

Your screenshots further validate the approach I detailed in my earlier post.

The images cannot be ordered/paginated the way you desire while using repeatable regions. As you can see in the code example I did not use repeatable regions. There is no reason for us to utilize them in this use case, especially considering the number of images you need per service.

I understand the dilemma you are now facing since you have gone down the repeatable region path and input lots of content already. I'm afraid you will just have to try something else. I highly recommend you give my approach a try... The multiple image upload feature of the gallery will allow you to add images quite quickly.
Then I definitely should give a try to solution provided by you, cheesypoof.
Thank you once again!

Attila
Hey cheesypoof,

Your solution is perfect, I changed only one thing in your code, because I use PrettyPhoto for viewing images.
So I changed this
Code: Select all
<a href="<cms:show k_page_link/>"><img src="images/gallery-bg.png" alt="" border="0" class="frame"/></a>
into this
Code: Select all
<a href="<cms:show gg_image />" rel="prettyPhoto[gallery]"><img src="images/gallery-bg.png" alt="" border="0" class="frame"/></a>

As pagination and sorting are now ok, there is only one thing left to do regarding image filtering.
As I said, I need to group somehow images for a kinde of archiving. I'm thinking on using subfolders for every folder named by service name, when displaying images all images are showed, but with a given option to filter images by subfolders name. Something like in this topic http://www.couchcms.com/forum/viewtopic.php?f=2&t=7387, the difference is that now there is not list view, but folder view if I'm right.
How should I change that code to work in this situation?

Thanks again, Attila
To display all of the images we need to make a minor change:

You are currently listing all of the services (folders) on the Portfolio home view. I think you should move this code with the cms:folders tag over to a new template (services.php). Make sure to add masterpage='portfolio.php' to this tag or it won't list the folders. In the Portfolio home view we can now copy the code for the folder view and simply remove "folder=k_folder_name" to list all of the images.

The structure is now:
yoursite.com/services/ - lists the folders (Services) of portfolio.php
yoursite.com/portfolio/ - lists all images of portfolio.php
yoursite.com/portfolio/indoor-decorations/ - lists all indoor decoration images of portfolio.php

Let me know if this has made sense so far. Could you expand on your image filtering requirement? I'm not understanding exactly what you want to accomplish.
16 posts Page 1 of 2
cron