FEU and Custom Content (Problem with Re-Direct)

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
ctrujillo45
Forum Members
Forum Members
Posts: 20
Joined: Tue Jul 07, 2009 5:29 am

FEU and Custom Content (Problem with Re-Direct)

Post by ctrujillo45 »

Hello-

I recently got some good advice on here regarding the document on how to hide private data using FEU, Custom Content and SelfRegistration.

I did the following:

1. Installed FEU
2. Installed CustomContent
3. Installed SelfRegistration
4. Configured Front End Users (Added Group, Added Sample User)
5. Created a Login Page

All of the above worked perfect. I was able to login with the user I had created. Next I tried add the Custom Content code to my template to facilitate the redirect. The code is below:

{if !$ccuser->loggedin()}{redirect_page page='login'}{/if}

I turned off the "cacheable" option on all of the pages as well. It appears the the site is timing out and it states that " The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete." The URL the redirect is pointing to is correct, as this URL would work if the code above was not included in my template. My login page is also named "login" to ensure it is linked correctly.

Am I missing a step? My goal is to have the users login to view any content on the site. If a user is logged in, he should be able to view all content otherwise he would get re-directed to the login page. I am trying to keep it as simple as possible for now.

Any help is greatly appreciated.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: FEU and Custom Content (Problem with Re-Direct)

Post by Rolf »

Hello ctrujillo45,

Just do something like this in your html-template:

Code: Select all

{if $ccuser->loggedin()}
     {content}
{else}
     <p>Please login first:</p>
     {cms_module module=FrontEndUsers}
{/if}
Hope this helps, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: FEU and Custom Content (Problem with Re-Direct)

Post by jmcgin51 »

This document explains how do do this.  Written by the FEU/CC developer.

http://calguy1000.com/downloads.html
ctrujillo45
Forum Members
Forum Members
Posts: 20
Joined: Tue Jul 07, 2009 5:29 am

Re: FEU and Custom Content (Problem with Re-Direct)

Post by ctrujillo45 »

Rolf-

Yes, I followed the instructions in the document downloaded from the site you sent. For some reason, I cannot get the page to re-direct. Also, the code you suggested above did not yield results. The login form displayed as did the {content} of the site. Any other suggestions?

I have posted my template below:

-------------------------------------------------





{sitename}


{metadata}
{stylesheet} 


{if !$ccuser->loggedin()}{redirect_page page='login'}{/if}




{cms_module module='menumanager' template='bulletmenu' number_of_levels='1' template='SiteMenu'}
     

{title}

{content}



 
 
   
 




User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: FEU and Custom Content (Problem with Re-Direct)

Post by Rolf »

Hi ctrujillo45,

jmcgin51 sent you the document btw  ;)

In my first reply I gave you the answer I think, but I don't find this in your template...  :-\
The code needs to be around the {content} tag!

Grtz. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “Modules/Add-Ons”