Open andreamoro opened 9 years ago
The entry
object is only available in the template for a single entry, by default entry.html
.
Well, but if I do something like this
{%- if entry is defined %}
<h1 id="title" class="Print">{{ entry.headertitle | e }}</h1>
<h2 id="subtitle" class="Print">{{ entry.headersubtitle | e }}</h2>
{%- endif %}
I got the compiler going through with the correct replacement and I'm not in an entry.
Ah my bad. Can you show me your conf.py?
Well, actually the view page inherit from entry, so technically the entry exists in the context. Anyway, below there is the bit that you may be interested into. It's not a big deal, it's just for me to understand.
'/:slug': {
'view': 'page',
'template': 'main.html' # default, includes entry.html
},
This is a strange issue that I got since I have updated to the latest version using the github master.
I have an entry with a new variable defined in the YAML front matter. In my template I've recalled the variable with a {{ entry.variable }}
As soon as Acrylamid compiles the code, the following error is returned
However, having a look at the output the variable is rendered correctly.
This problem exists with Jinja 2.7.3 whereas it seems fine with Jinja 2.6