Jump to content

troubles with sort


Marco Angeli
 Share

Recommended Posts

Hi there,

I'd like to sort some thumbnails that link to a detail page, this is the code:

				<?php

				
	
				
				
			$works = $pages->find("template=detail, sort=-date, limit=3");
			
					echo "<ul id='itemContainer'>";
					
			foreach($works as $w) {

							

						echo "<li>
						<div class='span3'>
						
						<a href='{$w->url}'><img src='{$w->slide_images->eq(0)->getThumb('thumbnail')}' >	</a>
						
						<div class='pad15'></div>
						</div> 
						</li>";	


					}
					
					echo "</ul>";					
					
					$pagination = $works->renderPager();
					echo $pagination;
					
				?>

unfortunately, "sort=-date" doesn't seem to work...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...