Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Paul K Newcomer
@paulk · Joined 9 years ago · 8 posts · 1 topics · 0 reputation
Badges
Recent posts
-
Restrict / Hide pages by Group
· 9 years ago
Or if there was a way to only run that if statement on the pages/menu items that I specify because that statement does work.
-
Restrict / Hide pages by Group
· 9 years ago
I have done that already. That was the part you helped me solve at the beginning of this post. I have added access: site.affiliates: true to the frontmatter of the pages. But if I use this below on th
-
Restrict / Hide pages by Group
· 9 years ago
There will be more. But basically its show some new links "My Account" etc and hide some links "Become an Affiliate" etc. when a user from that group is logged in.
-
Restrict / Hide pages by Group
· 9 years ago
Ok @MakaryGo I have the html output for the menu now: Before affiliates group user logs in: <ul class="nav navbar-nav navbar-right"> <li class=""><a href="/about">About</a>&
-
Restrict / Hide pages by Group
· 9 years ago
Sure. I am trying to create a menu that changes once an "Affilitate" group user is logged in. Menu before login would be: > "About" "Programming" "Become an Affiliate" "Login" after login "About
-
Restrict / Hide pages by Group
· 9 years ago
Ok @MakaryGo so in the Bootstrap theme I found the file user/themes/bootstrap/templates/partials/navigation.html.twig I added {% if grav.user.authorize('site.affiliates') %} but it just hides the who
-
Restrict / Hide pages by Group
· 9 years ago
Thanks so much! That worked! How about hiding parts of the menu that are only visible when that group has logged in? I found this example for hiding parts of a page: /forum/archive/hiding-parts-of-pag
-
Restrict / Hide pages by Group
· 9 years ago
I just started looking at Grav today to see if it could be used for a new project. I am trying to see if I can restrict certain pages based on their group. I have figured out how to require a login to