Jump to content

manually sorting pages


Marco Angeli
 Share

Recommended Posts

Hi there,

I know this topic isn't new but I can't find a valid solution.

I'd like to reorder manually my subpages via drag and drop, but it doesn't work.

Here's my code:

<?php

				
			
			$works = $pages->find("template=visit-detail, limit=10");
			
					
					
			foreach($works as $w) {

							

				

			echo "<div class='col-lg-6 col-md-6 col-sm-6 '>
			
			<div class='port-item'>
			
				<a href='{$w->url}'>
								
                   <h4>{$w->title}</h4>
                   <p>{$w->visit_subtitle}</p>
						
				<div class='primary-photo'>
					<img src='{$w->slide_images->eq(0)->getThumb('visite-thumb')}' alt='Itineraria'>
					
				</div>
				 
				</a>
			
			</div>	
			
					
			</div>"; 


						

					}
					
									
					
					$pagination = $works->renderPager();
					echo $pagination;

					
?>

I'm aware that there was a problem with MySQL version, but hostgator currently uses 5.5.23 or higher.

It seems I can only order pages via "sort=-created", do you have any advice?

Thanks!

Link to comment
Share on other sites

  • 1 year later...

I sorted pages manually in the backend, but why the backend doesn't use the manual order? Frontend is solved by 

sort=sort

But if additional sorting is needed backend sort ordner sort=sort would be better?

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...