Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I've been trying to solve a listing issue I'm having. I know how to use folders and pages tags to list folders and pages, but I can't figure out how to achieve the following structure:

FOLDER NAME 1
-folder name 1 thumbnails
-folder name 1 thumbnails
-folder name 1 thumbnails...etc

FOLDER NAME 2
-folder name 2 thumbnails
-folder name 2 thumbnails
-folder name 2 thumbnails...etc

What I can achieve are:

FOLDER NAME 1
Folder name 1 thumbnail
FOLDER NAME 1
Folder name 1 thumbnail
FOLDER NAME 2
Folder name 2 thumbnail
FOLDER NAME 2
Folder name 2 thumbnail

OR

FOLDER NAME 1
- folder name 1 thumbnail
- folder name 1 thumbnail
- folder name 2 thumbnail
- folder name 2 thumbnail

FOLDER NAME 2
- folder name 1 thumbnail
- folder name 1 thumbnail
- folder name 2 thumbnail
- folder name 2 thumbnail

Is this even a possible structure for couch to achieve without hard coding it? I have found a possible javascript solution to re-order the information once the database prints it out into the document.
Hi,

Can you please let us know how your folders are structured (multiple thumbnails - are you using extended-folders?)

Also post your code that is outputting the incorrect listing.

Thanks.
I got it working! I was using a variable to try and match the folder ids to the page folder id's so they would group together, but it was't working because of the scope not being broad enough:

Code: Select all
<cms:pages masterpage='proof-gallery-2.php' limit='1'>
<cms:folders masterpage='proof-gallery-2.php'>
   <cms:embed 'check_access.html' my_folder_id=k_folder_id />
   <cms:if my_has_access >
   <h2><a href="<cms:show k_folder_link />"><cms:show k_folder_title /></a></h2><br> <br>
   <cms:set current_folder = k_folder_id scope='global'/>
   
   <cms:pages masterpage='proof-gallery-2.php' >
      <cms:embed 'check_access.html' my_folder_id=k_page_folderid />
         <cms:if my_has_access >
      <cms:if current_folder =k_page_folderid>
      <cms:if k_comments_count gt'0'>
         
      <a href="<cms:show k_page_link/>"><img src="<cms:show gg_thumb/>"/></a><br><br>
         
      </cms:if>
      </cms:if>
      </cms:if>
   </cms:pages>   
   </cms:if>
</cms:folders>
</cms:pages>


Note, I'm also testing for folder access and presence of any comments on the pages.
3 posts Page 1 of 1