3

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.

YannickR
  • 33
  • 4

1 Answers1

4

It looks like your problem is Leaf is expecting else, but are using #else. So changing your template to this should fix it:

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

Here is the relevant documentation.

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92