Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

Coordinates #47

Open
boredland opened this issue Sep 1, 2017 · 1 comment
Open

Coordinates #47

boredland opened this issue Sep 1, 2017 · 1 comment

Comments

@boredland
Copy link

Sadly, since there's no demonstration page, it is hard for me to understand how this plugin "should" work. As for now I added an event. I expected to coordinates to be collected to display the google map or sth. Actually this doesn't work. And: when displaying a single event, the location is displayed nowhere. I there some documentation for the location feature?

@maelanleborgne
Copy link

Hello, I know it may be a bit late for an answer but I just got started with this plugin, I had some trouble figuring out how it works but I think I got a grasp on it so here's how I use it, it might be helpful for new user in the future.
Basically I'm doing a calendar to log the gigs for an artist. The main Event page displays the calendar, so it's using the Calendar template. I made a Concerts page under this folder using the Events template, and in this folder I create new Event pages for each gig.
To display the event location, go to user/plugins/events/templates/partials/event_item.html.twig and and you can tweak the template to display the location wherever you want. If you want the location to appear anywhere else (calendar, sidebar, ...) just tweak the matching template.
As for the google map, I'm not sure to what extend we can rely on the coordinate so here's what I did if it can be of any help :
<h4 class="event-location"><a target="_blank" href="https://maps.google.com/maps?q={{ page.header.event.location|escape('url') }}">{{ page.header.event.location }}</a></h4>
It opens a google maps tab with a query on the location name.

Hope it helps.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants