Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
i have a media player on my site , i use folders for the playlist and what is inside it for the episodes. i made a new virtual folder and put 10 'files' in it but when i go to the page i dont see all 10. the code i use is here.

Code: Select all
<div><h3> Playlist's</h3></div>
<div class="sc_menu_wrapper">
<div class="sc_menu">
   <ul>
<cms:folders masterpage='video.php' limit='100' paginate='1' >
  <li><a href="<cms:show k_folder_link />"><big><cms:show k_folder_title /></big></a></li>
          </cms:folders>
            </ul>     
            </div>
            </div>
</div>
</div>
<div class="c50r">
              <div class="subcr">
         <div>   <h3> Episode's</h3></div>
<div class="sc_menu_wrapper">
  <div class="sc_menu">
   <ul>
   <cms:if k_is_folder >
<cms:pages masterpage='video.php' orderby='ep_name' order='asc' folder=k_folder_name limit='25' >
     <li><a href="<cms:show k_page_link />"><big><cms:show ep_name /></big></a></li> 
   </cms:pages >
</cms:if>
            </ul>    


this is a scrolling list so it should scroll, i thought it was my internet cache but i deleted that and my cookies but it still isnt showing the episodes. also i have it sorting by episode name and that isnt working on this list either. i had the same problem yesterday but it finally sorted itself out. is there a cache inside of couch sowhere to clear out so that it displays correctly?

here is a page with it working correctly

http://echoes.net63.net/video.php?f=34

and here is one with it not
http://echoes.net63.net/video.php?f=35

maybe it is just my browser could you sheck it and see if it is working correctly in yours?
also i tried to lorder the folders by folder name yesterday and it would not order right for me either stayed the same as it is now/
Hi,

So you have two problems -
1. There are 10 pages within a given folder but not all of them are getting listed.
2. The list is not sorted by the custom field you specified.

I'll reply to the second one first -
The list is appearing as follows
Code: Select all
Part 1
Part 10
Part 5
Part 6
Part 7
Part 8
Part 9

This, in fact, is the correct sort order!
The field you are using for sorting is of 'text' type and in text, '2' will come after '10' because '2' is greater than the '1' in '10'
(try creating real folders on your computer's file system and you'll see the same behaviour).

The order you are looking for ( 10 comes after 2) can be achieved by having a field of 'numeric' type.
What we can do is create a new editable region of type text in video.php and set its 'search_type' to 'integer'
Code: Select all
<cms:editable name='my_sort' type='text' search_type='integer' />

By setting the search_type to integer we are declaring this field to be numeric.

Now set this field to whatever position you desire a page to be on (Part 10, for example, will have a value of 10).
Finally use this numeric field to order the pages
Code: Select all
<cms:pages masterpage='video.php' orderby='my_sort' order='asc' folder=k_folder_name limit='25' >
   <li><a href="<cms:show k_page_link />"><big><cms:show ep_name /></big></a></li>
</cms:pages >


Coming to the first problem of not all the pages getting listed-
have you made sure that the 'publish date' of the pages not being shown not set to sometime in the future? By default pages with publish date of future are not fetched by the 'pages' tag.
Try removing the 'folder=k_folder_name' as a temporary test. Now 'all' the pages should get listed. Do the ones that were missing now being shown?

Please let me know.
yes somehow the publish date was for tommorrow , i believe i didnt set my time zone up right, maybe this is why it published it as tommorrow. i put the new editable in the video page and it is sorting just how i want it to now. thank you
Thanks for letting me know.
You are always welcome :)
4 posts Page 1 of 1