Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • hermes_zum Friend
    #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 Friend
    #539946

    @hermes_zum,

    Please 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. Screenshot_5
    hermes_zum Friend
    #540717

    ty Nazario :), is working very well.

Viewing 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