I would like to compare a variable with a string in my worksheet template.
I get the variable through the controller in my template:
<nav class="navbar navbar-default">
<div class="container-fluid">
<ul class="nav navbar-nav">
#if(path == "/database") {
<h1>Hello, there!</h1>
}
<li><a href="#">Filldatabase</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>
I want that when I'm on the page /database, I get h1 that says "Hello, there!". How should I do it? I think I need to use #if(), but I cannot find the correct syntax.
source
share