-
AuthorPosts
-
June 23, 2014 at 1:26 am #199069
Hello,
I have my titles, hotspots, disorganized.
I needed to sort the titles alphabetically in Dropdown selection.
Is it possible to do? Otherwise, anyone have some code I can add to the JS to arrange the list alphabetically?Regards,
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
June 24, 2014 at 2:38 am #539946Please open the file: /modules/mod_jaimagehotspot/mod_jaimagehotspot.php then add this code block:
usort($description, function ($a, $b) {
if(empty($a->title)) {
$a->title = JText::sprintf('JAI_TITLE_DEFAULT', $a->imgid);
}
if(empty($b->title)) {
$b->title = JText::sprintf('JAI_TITLE_DEFAULT', $b->imgid);
}
return $a->title > $b->title ? 1 : -1;
});Please back up the file before making change. Hope this helps.
-
1 user says Thank You to Nazario A for this useful post
June 30, 2014 at 9:49 pm #540717ty Nazario :), is working very well.
AuthorPostsViewing 3 posts - 1 through 3 (of 3 total)This topic contains 3 replies, has 2 voices, and was last updated by hermes_zum 10 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Is it possible to sort alphabetically?
Viewing 3 posts - 1 through 3 (of 3 total)