sorting order

Discuss anything related with the GoogleMap component here.

sorting order

Postby WR-Fife » Sat Oct 17, 2009 7:13 am

Hi Jan

I hope Pro version is kicking off nicely ;), sure youve put loads of work there

I had a quick question to do on a basic version I had installed in a web.
I have loaded destinations via the admin panel, and they are listed in the "find on map" list at the bottom of the map.
My problem is that Ive had to update this list. the list refers to orthopaedic workshops in the region, and they should be sorted by cities to make sense in a search of the list (an alternative valid order could be alphabetically), having them all mixed up doesnt help the person checking the list.
As Ive updated the list, I have saved the new listing order in the admin side

but I cant see this order trasnferring to the public side

And I cant see either in the menu or the category or the setup somewere I can force it to be ordered by menu order.

is there a way to solve this? much apreciated your help as always
WR-Fife
Last edited by WR-Fife on Sat Mar 06, 2010 1:16 am, edited 1 time in total.
WR-Fife
 
Posts: 19
Joined: Fri May 29, 2009 11:24 am

Re: sorting order

Postby admin » Sat Oct 17, 2009 7:31 am

Look in this file models/advanced.php


Code: Select all
  function _buildQuery($id)
       {
          $query = 'SELECT a.*'
             . ' FROM #__google_destinations AS a, #__google AS b '
             . ' WHERE a.published=1 AND b.published=1 AND a.catid=b.id AND b.id='. (int) $id
             ;




Add this before the last (semicolon) line:


Code: Select all
. ' ORDER BY a.ordering'
admin
Site Admin
 
Posts: 1104
Joined: Thu Apr 02, 2009 9:17 pm

Re: sorting order

Postby WR-Fife » Sat Oct 17, 2009 7:55 am

Hi Jan.

what are u doing a fine sat morning on the PC, rofl
could you pls check the route for the files you mention? I cant find such file on my installation

I guesses u meant Modules/ and then either mod_googlemaps or mod_google but I cant find it in either
soz to bother u, tx for quick reply.

WR-Fife

EDIT: under Modules/ there is no advanced.php file
Last edited by WR-Fife on Sat Mar 06, 2010 1:14 am, edited 1 time in total.
WR-Fife
 
Posts: 19
Joined: Fri May 29, 2009 11:24 am

Re: sorting order

Postby admin » Sat Oct 17, 2009 8:09 am

oo I though you meant the component.

The screenshot you gave me was from the component

components/com_google/models/advanced

And yes, the weekends is where I have the most time for stuff like this. The weekdays are packed.

But just to please you, I will leave my PC behind for the next couple of hours, so expect a late reply:)

/jan
admin
Site Admin
 
Posts: 1104
Joined: Thu Apr 02, 2009 9:17 pm

Re: sorting order

Postby WR-Fife » Sat Oct 17, 2009 11:43 am

ah! and there it is :)

you must realice we dont all have such a deep understanding of the Joomla guts as you do. When u wrote "model" I guessed wrongly you had mispelt "module" and I followed down that road.

Wish you could see the 24ºC sunny cloudless bright day we have in town today. I just came back from sipping a beer at a terrace in short sleeves.
But I worry if I go too much in depth in this you would stop posting your help in the forum, rofl.

So i better pack it up and thank you!
hugs and grins
WR-Fife
Last edited by WR-Fife on Sat Oct 17, 2009 11:57 am, edited 1 time in total.
WR-Fife
 
Posts: 19
Joined: Fri May 29, 2009 11:24 am

Re: sorting order

Postby WR-Fife » Sat Oct 17, 2009 11:54 am

It worked easy and correctly, but the resulting list has no breaks tween cities, so a visitor cant see wich shops belong to wich cities and the overall look is chaotic once more. Unless you prevoisly have a good understanding of the list, it makes no sense though its in the right order by cities.

can i bother you a last time to ask you what the code would be for a strict alphabetic order , so that all the shops, independently what town there are in, will be displayed in a common alphabetic order? I think the resulting list will be more coherent for a visitor.

it looks as if it will be raining and thundering here tomorrow and Im already feeling miserable....... (lol, not true but I hope you will pity)

hugs
WR-Fife
WR-Fife
 
Posts: 19
Joined: Fri May 29, 2009 11:24 am

Re: sorting order

Postby admin » Sun Oct 18, 2009 3:55 pm

hehe,

Instead of the

Code: Select all
ORDER BY a.ordering


try

Code: Select all
ORDER BY a.name


Ths should list it out by the name you gave the destination.

/jan
admin
Site Admin
 
Posts: 1104
Joined: Thu Apr 02, 2009 9:17 pm

Re: sorting order

Postby WR-Fife » Sun Oct 18, 2009 5:43 pm

thank you Jan, that worked beautifully, the list makes good sense now.

thanks for the help
WR-Fife
 
Posts: 19
Joined: Fri May 29, 2009 11:24 am

Re: sorting order

Postby zeusrw » Mon Mar 29, 2010 2:26 am

Very helpful... thanks a bunch.
zeusrw
 
Posts: 6
Joined: Mon Aug 31, 2009 4:43 am


Return to GoogleMap 1.0.2 AND 1.0.3 Light

Who is online

Users browsing this forum: No registered users and 1 guest

cron