Is it possible to inject a variable, which is stored in the page header from the content area?
What I am looking for is an ability to inject data stored in the page header in the markdown formatted content area.
Like this example:
variable1: inject me
Heading1 of MarkdownText
Some content formatted in Markdown and [# magic code that injects variable “variable1” #] here Markdown Content goes on…
Sure it’s simple. First you need to enable Twig processing in the page header, then you just use Twig to output it:
- – -
title: My Page
process:
twig: true
variable1: inject me
- – -
# Heading1 of MarkdownText
Some content formatted in Markdown and {{ header.variable1 }} here Markdown Content goes on…