We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Reorder Entries

Development and Programming

MadMonk Interactive's avatar
MadMonk Interactive
6 posts
16 years ago
MadMonk Interactive's avatar MadMonk Interactive

I’ve searched around the admin, the documentation, and google but I couldn’t find any information on reordering images (entries) for the Photo Gallery Module.

The ability to rearrange categories is there but our project requires that the individual images to be rearranged.

This doesn’t seem too complicated. Actually I’m surprised how expansive the module is and yet it doesn’t have this feature. Any help would be useful, thank you.

       
Robert Wallis's avatar
Robert Wallis
36 posts
16 years ago
Robert Wallis's avatar Robert Wallis

To reorder use the “orderby” paramater: http://expressionengine.com/docs/modules/gallery/parameters.html#par_orderby

You could orderby “title” or “caption”, and put numbers in the first part of the title or caption to force a specific order. If you need to display both the title and caption, you could parse out the number using a delimiter like so: (this example uses “:”)

<?php echo (FALSE!=($pos=stripos(($title="{title}"), ":")))?(substr($title, $pos)):($title); ?>

The above code is untested.

       
MadMonk Interactive's avatar
MadMonk Interactive
6 posts
16 years ago
MadMonk Interactive's avatar MadMonk Interactive

That actually works great since we aren’t using the titles for entries. Thanks for the quick reply & help.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.