Page 1 of 1

FEU and Custom Content (Problem with Re-Direct)

Posted: Thu Nov 19, 2009 6:22 am
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.

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

Posted: Thu Nov 19, 2009 7:04 am
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

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

Posted: Thu Nov 19, 2009 2:10 pm
by jmcgin51
This document explains how do do this.  Written by the FEU/CC developer.

http://calguy1000.com/downloads.html

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

Posted: Thu Nov 19, 2009 9:03 pm
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}



 
 
   
 





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

Posted: Thu Nov 19, 2009 9:13 pm
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