Forum for discussing general topics related to Couch.
11 posts Page 1 of 2
:) Hi all! I have 3-4 categories of projects to be shown on separate pages.
Clicking on each item there opens a page for that particular project with little description, 3-4 pictures and things.
Hope I can use a method similar to that in the portfolio tutorial.
Most importantly I have to show in the order proj 1, proj 2, proj 3 and so on - on each projects main page.
Hope this is possible with Couch 2.0..
Please let me know.
Thanks a lot..
Hi,

I think you can manually order the pages in the admin panel as described under "Manually reorder normal cloned pages" heading of viewtopic.php?f=5&t=10241.

Next, on the front-end you can display the pages in the same order as set above by using 'weight' as the 'orderby' parameter of <cms:pages> e.g. as follows -
Code: Select all
<cms:pages masterpage='some-template.php' limit='15' paginate='1' orderby='weight'>
..
</cms:pages>

Would this help?
Thanks a lot, KK. :)
Will try that and come back.
:? I have 2 (or 3) categories of work in my portfolio. Each on a separate page. Each having 5 images+name of work in that category.
My template code is:
Code: Select all
<cms:template title='Projects' clonable='1'>
   <cms:editable name='page_title' label='title' type='text' />
   <cms:editable name='prj_address' label='Address' type='richtext' />   
   <cms:editable name='prj_desc' label='Description' type='richtext' />
   <cms:editable name='image_1' label='Hero Image' crop='1' width='1200' height='600' type='image' />
   <cms:repeatable name='prj_images' label='Project Images' >
        <cms:editable type='image' name='prj_image' label='Image' width='480' height='325' show_preview='1' preview_width='150' col_width='200' />
    </cms:repeatable>
</cms:template>

& this is the display code
Code: Select all
<div class="container">
  <div class="section">
     <div class="row">
    <h2><cms:show page_title /></h2>
     <div class="col s12 m12 l3">
           <h3>Project Summary</h3>
      <h4>Address</h4>
      <p><cms:show prj_address /></p>
      <h4>Description</h4>
      <p><cms:show prj_descr /></p>
      </div>
      <div class="col s12 m12 l9">
           <h3>Gallery</h3>
      <div class="gal">
           <cms:show_repeatable 'recent_work' >
                      <a href="<cms:show work_image />" rel="cobo" title="<cms:show work_caption />"><img src="<cms:thumbnail work_image width='146' height='111' />" /></a>
           </cms:show_repeatable>
      </div>
      </div>
      </div>
  </div>
</div>

Now I am confused at how to structure the Projects main page which has 4-5 images for each category
(total categories are 2 or 3 ; one category per page)

Kindly advice.. Thanks a lot.
Apologies for the long post..
Hi,

I apologize but I couldn't understand the scenario from your description (I think you are using the terms 'categories' and 'pages' a tad differently from what is the convention of Couch).

Could you please try posting some images instead? Rough mockups will also do. Just please show the main page and the inner pages marking out the 'categories' and 'pages' you mentioned.

Sorry for troubling you.
Thanks a lot, KK. :)
I am sorry, but I managed to get it right - well, almost.
I was slightly confused as there was only one category per page and whether I need folders here.
I used just one (category) folder here..
KK, I got the individual project details displayed correctly. The only issue now is in the projects list page (which list all projects of a category) text links displays but no images.

Here is an image to my (1) projects list page
project-list.jpg
project-list.jpg (3.74 KiB) Viewed 1416 times
(I have just one category on the page)

and (2) individual project details page.
project.jpg
project.jpg (4.36 KiB) Viewed 1416 times


Kindly advice..
Thank you..
Could you please post the code you are using to list the images?
Better still, please PM me your site's FTP + Couch admin creds and I'll take a look at the issue. Thanks.
I'm sorry, KK, the site has not been hosted yet. Its here on my pc.
Anyway, here is the code which should list the items in a category.
Code: Select all
<cms:pages masterpage='project_main.php' page_name=k_folder_name>
   <h3><cms:show k_folder_title /></h3>
</cms:pages>

<cms:pages masterpage='project.php' folder=k_folder_name>
   <a class="float <cms:zebra 'alpha' '' 'omega' />" href="<cms:show k_page_link />">
       <span><cms:show k_page_title /></span>
       <img class="responsive-img" src="<cms:show thumb />"  alt=""/>
   </a>
</cms:pages>

What might I be missing :?
Please take a look.
Thanks..
Not a problem. Please zip and PM me the 'project_main.php' and 'project.php' templates (and any snippets they might be using). Thanks.
11 posts Page 1 of 2
cron