×

Notice

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

TOPIC: Map display in K2 Category or Module

Map display in K2 Category or Module 9 years 11 months ago #26371

  • Simon Wells
  • Simon Wells's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 40
  • Thank you received: 0
Hey Daniel,
Decided to purchase pro version to take advantage of the K2 Plugin as I am trying to make a Pinterest Boards style layout of images on a map.

At this stage, K2 and custom field are setup per instructions and the map is displayed with the marker into the K2 item, perfect.
Next, I wish to show a map of all markers from one K2 category, either placed into the K2 Category description or a module, placed above the K2 category.
I do not want to create a dedicated menu link to the Hotspot Map View as I still wish to show the k2 items in the k2 category view. This allows easers to find images via location on the map, or scrolling through the introimages in the category view.

I thought to use the No Number content anywhere.
Created a hidden menu link to the Map View, to get the URL.
Created a custom HTML module with the custom code to display the content from the menu link. The module loads, but the map does not.
My URL in the menu link is
index.php?option=com_hotspots&view=hotspots
My URL on the front end, is
map#!/catid=1
and loads the map.
I have tried adding both into the recommended
{component index.php?option=com_hotspots&view=hotspots}
or
{component map#!/catid=1}
neither of which work,

<!-- Components Anywhere Message: The component cannot be placed because an invalid URL is given or the page timed out. -->

PS, other content and modules anywhere that are setup across the site function.

Can anyone suggest an alternative way to display the map of all markers in a module or injected into content?

Map display in K2 Category or Module 9 years 11 months ago #26374

  • Simon Wells
  • Simon Wells's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
  • Posts: 40
  • Thank you received: 0
OK, I think I have made some progress.

For anyone interested to have their Hotspot Map appear anywhere other than from a menu link.
  1. Create your Hotspot map, using which ever content type you choose. I used K2 using the supplied plugin
  2. Enter your map co ords to the content
  3. Create a hidden menu link selecting the appropriate Hotshot map
  4. Install an additional extension, such as No Number Content Anywhere
  5. Create a module, set the position etc. Enter the Content Anywhere
    {component index.php?option=com_hotspots&view=hotspots&Itemid=MENUID}
    substitute MENUID for the ID # of the menu item the points to the Hotspot map
  6. or
  7. Enter that code into other content or hard code into a template over ride.

Once I have a little JS conflict with K2 ironed out, I shall post a link to show the finished item.

Map display in K2 Category or Module 9 years 11 months ago #26379

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Simon,
So what is exactly Content Anywhere doing? Does it create an iframe, or does it load the component as part of the page?

That is really interesting - I've been advising users to create a hidden link in the menu and then just use an iframe to load the component where they want it, but if content anywhere is doing it better, that this would be cool :)

Cheers,
Daniel
  • Page:
  • 1
Time to create page: 0.139 seconds