How do I make the logout return to the home page? There is something suspicious with the view. On the list of views where it shows the path of the views, the view in question shows the path as "/". When I edit the view the path is "master-sitelist". I can't see where it's set to "/". To get to the view I do indeed have to type the url "domainname/master-sitelist", If I type the domain name with or without a slash I do get the home page.

Comments

ItangSanjana’s picture

Please export your views here.

Asahitechnologies’s picture

Hi,

Use Login Destination module to set which page to redirect if a user logout as well as where to redirect after a user has successfully logged in.

https://www.drupal.org/project/login_destination

To set logout destination to home page, download and instal Login Destination module. Enable the module.

Goto Site Configuration-->People--> Login Destinations.

Click on Add Login Destination Rule from the page displayed.

Check internal page or external URL for Redirect To Page and add <front> as the page to redirect.

Check Logout for Redirect upon triggers

Click Save and your done.

Thank you.

Regards,

Avinash

peterjlord’s picture

I'd use the rules module https://www.drupal.org/project/rules

And here is on to do the redirect. You just need to import it.

{ "rules_redirect_to_home_logout" : {
    "LABEL" : "Redirect to Home Logout",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "user_logout" : [] },
    "DO" : [ { "redirect" : { "url" : "\u003Cfront\u003E" } } ]
  }
}
drupaldelhi’s picture

I dont think this is a problem with views. You will probably need to create some action/trigger or set rules to achieve this.