vendredi 28 décembre 2018

Using Leaf, the else condition isn't properly executed though the if one is

I have a simple Leaf template that I'd like to display Hello World in.

#if(false) {
<title> All hail Apodron.</title>
} #else {
<title> Hello World </title>
}

the page has no title and displays as:

#else {Helloward}

However, if I change this to:

#if(true) {
<title> All hail Apodron.</title>
} #else {
<title> Hello World </title>
}

then the title does display, but the page STILL shows up as:

#else {Helloward}

I also tried various syntaxes, such as:

##else { <title> Hello World </title> } and #else() { <title> Hello World </title> } or even ##else() { <title> Hello World </title> }

This seemed very basic, and I believe I followed the documentation.

Aucun commentaire:

Enregistrer un commentaire