How To Change Image Gallery Order?

derrickhand300
@derrickhand300
9 years ago
1,353 posts
I have images in a gallery- I want to change the order in which they are displayed
I would like them to be displayed like it is using this code
{jrCore_list module="jrGallery" search1="_profile_id = 1" order_by="_created desc" pagebreak="50" pager="true" page=$_post.p group_by="_item_id" template="widget_list_grid_4.tpl" tpl_dir="jrGallery"}

I am working in the jrGallery_item_gallery.tpl but I do not understand how this template is ordering the images?

I really thought somewhere in the template would be code similar to the above and i would only have to change the
order_by="_created desc"
Seems this template uses something different..
Any tips on how to do this?
I have attached the template code
updated by @derrickhand300: 12/22/16 11:55:59AM
douglas
@douglas
9 years ago
2,800 posts
Using that code will display the first image in the Gallery, if you want to modify the first image in the Gallery, you'll want to change the order on the profiles gallery detail page, ie. http://roughneckcity.com/roughneck-city/gallery/oilfield-photos/all . Just drag-n-drop the images in the order you want them to show.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thanks-if I have 12 pages of images will I have to drag the newest image each time its uploaded across 12 pages to get it first? Also I need the pagination for the 12 pages...
Is there something more practical to
1- show the newest images in a gallery first
2-have pagination as needed
douglas
@douglas
9 years ago
2,800 posts
It looks like the last image uploaded becomes the first image in the Gallery, so you shouldn't have to move the last image uploaded if you want it to be the first image in the Gallery.

I'm not sure what you mean by number 2. Are you wanting a way to turn off pagination?

Thanks!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
derrickhand300
@derrickhand300
9 years ago
1,353 posts
No the newly uploaded images are being added randomly throughout the gallery- they are never first
trying to understand why
Many other issues-IMAGE TITLE appearing on ALL images in the gallery for instance if i upload a new image and give the image a title- that title appears on ALL images in the gallery

updated by @derrickhand300: 04/29/16 11:32:34AM
michael
@michael
9 years ago
7,791 posts
derrickhand300:
I have images in a gallery- I want to change the order in which they are displayed
I would like them to be displayed like it is using this code
{jrCore_list module="jrGallery" search1="_profile_id = 1" order_by="_created desc" pagebreak="50" pager="true" page=$_post.p group_by="_item_id" template="widget_list_grid_4.tpl" tpl_dir="jrGallery"}
I am working in the jrGallery_item_gallery.tpl but I do not understand how this template is ordering the images?
I really thought somewhere in the template would be code similar to the above and i would only have to change the
order_by="_created desc"
Seems this template uses something different..
Any tips on how to do this?
I have attached the template code

What you have inside item_gallery.tpl is the order that is defined by the module in:
/modules/jrGallery/profile.php

in the profile_view_jrGallery_default() function. That function has decided that it will go and get all the images in an order that is set by the image order.

There are a couple of ways to stop that by making a module, but an easier way is to just use the code you have.

You know you want that code, so use that code.

Yes, all the items you want already exist in your over-ridden template jrGallery_item_gallery.tpl but they are not in the order that you want and you don't want to make a module, so make the entire contents of jrGallery_item_gallery.tpl be:
{jrCore_list module="jrGallery" search1="_profile_id = 1" order_by="_created desc" pagebreak="50" pager="true" page=$_post.p group_by="_item_id" template="widget_list_grid_4.tpl" tpl_dir="jrGallery"}
and you have what you want.
derrickhand300
@derrickhand300
9 years ago
1,353 posts
yes- that is actually the work around i have been using and instead of using the default gallery page I have been using the custom page using the template code above...one reason for wanting to use the default page was for the upload button on the image page...so that i could upload images directly from that page instead of clicking around to find the gallery default page..
michael
@michael
9 years ago
7,791 posts
ah, the trials of getting things just right.... ;)

You could copy the widget_list_grid_4.tpl to your skin and use a custom version of it which also included the buttons from the item_list.tpl template to get things just how you like them if you wanted.

Just grab the button code from item_list.tpl and the bits you want from widget_list_grid_4.tpl and make your own template. :)
derrickhand300
@derrickhand300
9 years ago
1,353 posts
Thank you-I will give it a go

Tags