Change the front page value for logged in users

by big_smile   Last Updated July 19, 2018 23:07 PM

On my site I have two front pages:

  • node/31, for anonymous users
  • calendar-node-field-journal-date/month, for logged in users

When a users clicks on the front page (which is rendered as $front_page in my page.tpl.php file), I want them to be taken to the appropriate front page.

However, if a logged in user goes to node/31 directly (e.g. by not clicking on the front page link) they should still be able to see the node (and not be re-directed).

After researching, I've found Rules is the best way to do this and there are instructions here. However, this re-directs logged in users when they visit node/31. How can I get the Rule to only run when the user clicks on the $front_page link and not on the direct node/31 link?

I don't want to set it up via my theme, as I am sharing the theme on a multi-site. I also don't really want to install other modules, as I am already using Rules for other things.

Tags : rules

Answers 1

I would recommend the Front Page module, not rules:

The Front Page module allows for customised home pages dependant on role. The pages can be of the following types:

Alias (only 2.x branch) - Allows for another Drupal path to be shown as the home page without redirecting the user.

Redirect - Allows you to redirect users to a local or remote URL.

Themed - Allows you to enter some static text that will be placed into the content area > of a standard Drupal page. Full - Allows for static content to be displayed to the screen as is. This method does not pass through Drupal's theming system.

May 06, 2015 19:05 PM

Related Questions

Clone nodes and change fields with Rules and VBO

Updated May 20, 2015 20:03 PM