Problems, need help? Have a tip or advice? Post it here.
4 posts Page 1 of 1
how can I set up the order in which they are diasplayed in the gallery ?

Like Numeric first

2nd A

3rd B
hi Subhamoy, I assume you are using a cloneable template with gallery='1' and dynamic_folders='1'.

To give my clients the option of ordering their photographs I include an editable field:
Code: Select all
<cms:editable name='photo_order' type='text' label='Photo order' desc='use this to arrange the order of the photos - lower numbers come first e.g. 10 will come before 20 and so on!' search_type='integer' />


And then use this field to sort:
Code: Select all
<cms:pages masterpage="gallery.php" folder=folder_name include_subfolders='0' orderby='photo_order' > 


It's a bit cumbersome - but I don't think there's any other way of doing it.
Hello,
I suppose you could use custom php sorting by names or other fields, for example (not tested):
Code: Select all
 <cms:php>
  $gallery_array = array(<cms:pages masterpage="gallery.php">"<cms:show k_page_title />",</cms:pages>);
  asort($gallery_array); // use your method for sorting
  foreach ($gallery_array as $value) {echo "$value";}
</cms:php>

And then make rendering items accordingly to the sorted array. It's just an idea. But I think you'd better wait for 1.4.5 version in which as I know the sorting will be much easier.
Hi All ,

I am now able to order anything as my choice.

Code: Select all
<cms:pages masterpage='portfolio.php' folder=cat_1  orderby='name'  order='asc' limit='6' paginate='1'> 



Orderby = can be name , moiblie no, e-mail etc.
order = can be ase (ascending) or desc (descending)

Thank you
4 posts Page 1 of 1
cron