Jump to content

Putting the MapMarkerFieldtype map into the sidebar


ZalnarT
 Share

Recommended Posts

Hi everyone :)

I'm trying to put the map into my sidebar (i'm still using the default sidebar approach). the sidebar is in head.inc, the map would be in a template. Is it possible to append the $map-variable to the sidebar field or do i have to work around that?

Code for the sidebar (this is in head.inc):

if($page->sidebar) echo $page->sidebar;
else echo $homepage->sidebar; 

$map (this will be in event.php, a template):

$map = $modules->get('MarkupGoogleMap');
echo $map->render($page, 'map', array('markerTitleField' => 'mapMarkerTitle',
                    'useMarkerSettings' => 'true',
                    'markerLinkField' => '',
                    'useHoverBox' => false,
                    'icon' => $config->urls->templates . 'images/marker.png'
                    )); 

You can view the page here: http://caladthalad.larp-treibgut.de/web/events/calad-thalad-6/ the map should appear above the navigation right to the content.

I'd be more than thankful if someone had a suggestion^^

Edit:

Okay, i found my problem (i guess): I was trying to change the sidebar after it was rendered, which doesn't make much sense^^

Edited by ZalnarT
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...