Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

If Statement in Markdown

Started by Muut Archive 10 years ago · 2 replies · 2158 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 1367 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1125 9 years ago