Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

If Statement in Markdown

Started by Muut Archive 10 years ago · 2 replies · 2286 views
10 years ago

Is it possible to add an if else statement in Markdown?

I've been using the comments plugin. In user/config/site.yaml I added
menu:

YAML
url: '/register' 
text: Register

To add a menu item on my homepage. I created a test account and successfully logged in. But after logging in, the "register" menu item still shows up, along with the "welcome" and "logout" menu items that are added after logging in. Is there a way to make an if statement to only show the register menu item if the visitor is not logged in? Alternatively, is there another way to add the register page another than in site.yaml? Thanks.

10 years ago

Got it working. You've been a big help, thank you!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2300 9 years ago
Archive · by Muut Archive, 9 years ago
2 1509 9 years ago
Archive · by Muut Archive, 9 years ago
2 4766 9 years ago
Archive · by Muut Archive, 9 years ago
1 3582 9 years ago
Archive · by Muut Archive, 9 years ago
3 1638 9 years ago