Jump to content

Display a different, login-related menu item to logged in users


Recommended Posts

Posted

I am using the LoginRegister module and I would like to display a different, login-related menu item to logged in users. That is, in my navigation menu I have the "Login" item through which the user can log in (a template file with the code "echo $modules->get('LoginRegister')->execute();") and I would like to display that item with the name "Account" when the user is logged in.

Is there a common solution for this?

Posted
<?php namespace ProcessWire;

if($user->isLoggedin()) { // you can go more deeper with roles, etc...
	render_my_sekret_menu();
}

 

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...