Using plugins a little difficult

hi, lately i try to use gmap plugin and read tutorial but could not run it properly. i could not find video tutorials to watch and practise it. i want to write an introdiction article about Grav in my site ( webritmi.com ) but there is some parts i could not solve yet.

I didn’t write that plugin but form looking at it quickly here is some advice:

If you are wanting to use this in a markdown page, you will need to turn on twig processing because it’s generated using a twig tag:

process:
  twig: true

After that you should be able to just use the Twig tag in your markdown:

{{ gmaps({'address': '201 Wood Lane, White City, London W12 7TQ'}) }}

That should work :slight_smile:

Yes it’s true, sorry for reply only now, but my time is less then in the past… btw the example from @rhkster it’s true!

hi, i don’t know place where i put the twig tag. My sample is …\grav-skeleton-blog-site\user\pages\01.blog\google-map. so should i put the twig tag into the item.md file under google-map folder or where to put it and what i write into item.md file to call the map?

No, the Twig tag goes in the template file you create to display the page, not the .md file containing its contents…

Actually that’s not entirely true :slight_smile:

It really depends on your needs. Grav lets you do both.

  1. If you want your map to be in the middle of your content, you can put the twig tag in the middle of your markdown in your item.md file (just turn on twig processing in the header as I showed).

  2. If the map is more a structural element of the page, it may make sense to create a new template specifically for this, say item-google-map.html.twig, that is basically a copy of item.html.twig that has this twig tag in it (no need to turn on twig processing here obviously)

If you go with the second approach and you are creating ore modifying theme ‘things’ you probably should do your own theme with the theme inheritance.

Dang! I did forget about allowing Twig processing in Markdown files. There may be some places I need that myself. :slight_smile: