×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Showing two categories on map

Showing two categories on map 10 years 9 months ago #21690

  • Simo Lääveri
  • Simo Lääveri's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Hi,

I want to show that my category Kampaamot (ID 3) is shown first and then Parturit (ID 2)
I have tried many settings on settings but end result is always same!

My site is www.kampaajalle.fi

Showing two categories on map 10 years 9 months ago #21691

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What do you mean with shown first? Aren't those showed at the same time on the map?

Showing two categories on map 10 years 9 months ago #21692

  • Simo Lääveri
  • Simo Lääveri's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
yes, but details are shown only in one location.
And I want my another location to shown there.

Showing two categories on map 10 years 9 months ago #21694

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
demo.compojoom.com/hotspots#!/catid=1;2
demo.compojoom.com/hotspots#!/catid=2;1

Do you see the difference in the 2 urls -> the category number that is at the end is always open. You can't manipulate this through the menu, but you could copy the generated link and manually manipulate it and then create an external link that points to hotspots.

Regards,
Daniel

Showing two categories on map 10 years 9 months ago #21745

  • Simo Lääveri
  • Simo Lääveri's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
I was not able to put this link to site homepage. I changed Id:s in database, but then link changed again. So somehow it allways want to show this other category as last!!

Can you advice me, if I change sql command and change sort order?

Br,

Simo

Showing two categories on map 10 years 9 months ago #21747

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What is the generated link? the only difference in the link above is the position of the ids
1;2
2;1

in the case 1;2 -> cat with id 2 is open
in the case 2;1 -> cat with id 1 is open

Showing two categories on map 10 years 9 months ago #21774

  • Simo Lääveri
  • Simo Lääveri's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
it is now 1;2 and it should be 2;1 but seems to be that I'm not able to get that situation to work.

Showing two categories on map 10 years 9 months ago #21777

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
In your joomla backend -> go to menu -> your menu -> create a new item -> select it to be just a link (not a component or anything else - link to external site)

paste the link and change the positions of the catids and that should be all.

Showing two categories on map 10 years 9 months ago #21778

  • Simo Lääveri
  • Simo Lääveri's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Yes, I tried that earlier but Joomla does not allow to do it. It says that default page must be component! SO I can make that link and it works correctly, but when I try set that menu item as homepage Joomla is giving error. And I need to show map on homepage.

Showing two categories on map 10 years 9 months ago #21779

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Create a link to the component. It can be in a menu that you don't publish anywhere on the site. After that create the external link.

Showing two categories on map 10 years 9 months ago #21780

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
I see what the problem is for you -> hotspots is your default link and you cannot have a default link be your home page...

So here is what we are going to do. You are going to create a template override for the following file:
components/com_hotspots/views/hotspots/tmpl/default.php

(make sure that you run hotspots 3.5)

on line 106 you have this
$domready .= hotspotsUtils::getJSVariables();
right after that add:
$domready .= "hotspots.DefaultOptions.startCat = '2;1'";

Now the url should change to what you want.

Regards,
Daniel

Showing two categories on map 10 years 9 months ago #21793

  • Simo Lääveri
  • Simo Lääveri's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
this works, thanks a lot!
  • Page:
  • 1
Time to create page: 0.129 seconds