Add content to Protected page for non-logged in users?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
tophers
Forum Members
Forum Members
Posts: 218
Joined: Thu Jun 07, 2007 7:25 pm
Location: Calgary, Alberta, Canada

Add content to Protected page for non-logged in users?

Post by tophers »

I have a site set up that uses FEU to let users pick their location (state). Some content is hidden using the Protected Content page type, based on where you are located. You also have the option to change your state, or even select 'None' if none of the options matches your location.

The issue I'm having is when someone is permitted to view a page, then switches their state to one that ISN'T permitted to see it, the page disappears from the nav (as expected), and the content disappears as well, leaving the user looking at a page devoid of content.

Can I drop some logic on the page to redirect them somewhere if this occurs? Or put some sort of 'default' content up if they get to the page but aren't allowed to see it? The same issue arises if someone links to that page from somewhere and the user isn't logged in to the correct group.


EDIT - we're using FEU without the need to log in as a registered user, so we don't simply want the present the user with a login screen. You can view the site in question at: http://www.superiorplusenergy.com/residential

If you select New York as your state, you can view the Electricity and Natural gas pages, but if you switch to New Jersey (Change State in the grey stripe) they are rendered blank. Thanks in advance for any advice!
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Add content to Protected page for non-logged in users?

Post by calguy1000 »

The ProtectedContent content type has an optional page to redirect to if login conditions are not met.

Alternatively, you could not use ProtectedContent, but use CustomContent.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
tophers
Forum Members
Forum Members
Posts: 218
Joined: Thu Jun 07, 2007 7:25 pm
Location: Calgary, Alberta, Canada

Re: Add content to Protected page for non-logged in users?

Post by tophers »

I was looking for something like that - I can redirect all such pages to one spot if needed. Where do I set this? I looked on the individual pages (Options and Permissions), and in Site Admin (Global Settings and Page Defaults), but couldn't find anything. Or is it a Smarty call I need to make in the template?

I'm running CMSMS 1.11.9 and FEU 1.21.18
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Add content to Protected page for non-logged in users?

Post by calguy1000 »

In the FEU settings.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
tophers
Forum Members
Forum Members
Posts: 218
Joined: Thu Jun 07, 2007 7:25 pm
Location: Calgary, Alberta, Canada

Re: Add content to Protected page for non-logged in users?

Post by tophers »

Got it. Unfortunately that seems t break the login process for us - as soon as you click on 'Change State' the redirect kicks in and you get punted from the page you are on. This could be a result of how we're using the login procedure, but that's something we can't change at this point.

Any other options available? Out goal was to make these types of pages easy for the client to manage, so I'd prefer not to have to resort to any complicated Custom Content calls if I can help it. Is there something in this post that could potentially help?
http://forum.cmsmadesimple.org/viewtopi ... ntent+type
Post Reply

Return to “Modules/Add-Ons”