I'm looking for a method to show or hide a navigation menu item depending on if the user is logged in or not. How can I accomplish this with Drupal 8? Should this be done with CSS?
Asked
Active
Viewed 179 times
0
-
There are many ways to do this. Do you just not want to show the menu item, or do you also want to restrict access to where the menu item points to? What does the menu item point to? Your question is way to broad for anyone to give you a definative answer. – 2pha Jul 07 '19 at 21:54
1 Answers
0
You can do this using twig Template :
{% if logged_in %}
PASSED YOUR CODE HERE ..
{% endif %}

Djamel Kr
- 759
- 1
- 4
- 14