Twig in user page

Hello,

If I understood correctly, I can use twig in my user pages as long as I declare twig as activated in the system.yaml.

theme: antimatter
markdown_extra: false
process:
markdown: true
twig: true

Once it’s activated, I have inserted a twig line in one of my page:

How to find us?
{{ gmaps({‘id’: ‘gmaps’, ‘class’: ‘gmaps’}) }}

But the result page shows the row twig line, and not the Google Maps.
Did I miss something?

Thanks for any help you could provide me with.

should be:

process:
    markdown: true
    twig: true

That with the plugin enabled should do it. You can test by putting this in your content:

page title: {{ page.title() }}

If that displays the title correctly, twig is running fine, and it must be an issue with the plugin somehow (perhaps needs to be activated on the page). So read the plugin README.md file for more details on that.

Hi,

thanks for the help.
So it seems that twig is not running fine on my configuration.

In my system.yaml, I have:

pages:
  theme: antimatter
  markdown_extra: false
  process:
    markdown: true
    twig: true

(...)

twig:
  cache: true
  debug: true
  auto_reload: true
  autoescape: false
--- 

I have switched twig: false to twig: true (in pages>process). Do I need to set anything else?

if you have it in your system.yaml then it’s enabled site-wide. I like to have it off in system.yaml, and just add it in the pages header where I need it. This saves every page from being processed for twig when they probably don’t need it.

Hello,

thanks for your answer.
I cannot figure out why it doesn’t work when I set it in the system.yaml.
Yet, I’ve set it in the page where I need it:

title: Access
menu: Access
image_align: right
process:
  twig: true

and it just works fine! Thanks.

in the system.yaml it should be:

pages:
   process:
      twig: true

Example in the documentaiton