logintoboggan.module contains function logintoboggan_page_alter, which sets the access denied please login message... and which tries to remove sidebars. I only discovered this because my theme's sidebar regions aren't covered by the function, which just unsets sidebar_first and sidebar_second.
The function is already built to allow overriding by initializing logintoboggan_denied_remove_sidebars ... but it's not documented anywhere I could find, and it's not included in the admin screen. I've attached a patch to add this setting to the admin/settings page for the module, for people like me whose themes have other regions. (or who just like their sidebars).
Comment | File | Size | Author |
---|---|---|---|
#4 | logintoboggan-sidebars-optional-1463310-4.patch | 1.56 KB | ptsimard |
logintoboggan-sidebars-optional.patch | 1.05 KB | ohthehugemanatee |
Comments
Comment #1
acidpotato CreditAttribution: acidpotato commentedThis patch works. I can use Context module to add sidebars. I tried adding custom template (page--user--register.tpl.php) and Context module to get the sidebars to appear but was stumped and couldn't figure out why normal Drupal overrides and methods were not working and this patch helped. Btw I am using Zen.
I don't understand why removing sidebars and preventing page template overrides is the default behavior. It is definitely above and beyond what this module needs to do, but all things considered, a great module. Thank you.
Comment #2
PieterDCI agree with anik8z.
Comment #3
squarecandy CreditAttribution: squarecandy commentedI agree - default value should be FALSE for logintoboggan_denied_remove_sidebars and option to remove them should be available in the admin, as per this patch.
Comment #4
ptsimard CreditAttribution: ptsimard commentedThis bit me hard. I spent over an hour hunting around with dpms trying to find what was removing the sidebars. Then I got super angry at LoginToboggan for not documenting this setting!.
And I thoroughly agree that this should be an optional behavior and very visible in the settings screens.
So here I took ohthehugemanatee's patch, changed the text, set it to a default of FALSE (both in the form and in hook alter) and rerolled it against latest dev.
Hopefully this gets accepted.
Thanks
Comment #5
mchampsee CreditAttribution: mchampsee at Champsee Solutions, LLC commented+1 Just lost a couple of hours trying to flag this down.