Page 1 of 2
FrontEndUsers and CustomContent module help!
Posted: Wed Mar 28, 2007 1:30 pm
by wms
Hi,
I'm using the latest version of CMSMS, version 1.1.2 of FEU and the latest version of CC.
My problem is, when I log in as a client, it also logs me into the employee area. How do I set up two different logins?
I created two different templates for client and employee. The content area for client is below (the employee template is the same, just the group equals employee).
{print showbutton=true script=true}
{title}
{cms_module module=CustomContent}
{content}
You must be logged in to view the content of this page.
{cms_module module=FrontEndUsers}
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 12:34 pm
by wms
Does anyone have any ideas on how to use two separate logins (ie. page for clients, page for emplyees - different user group)?
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 12:48 pm
by alby
wms wrote:
Does anyone have any ideas on how to use two separate logins (ie. page for clients, page for emplyees - different user group)?
Try with smarty method (view help of CC)
Alby
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 2:26 pm
by wms
Looking at the help for CC, it says:
{cms_module module=CustomContent}
{if $customcontent_loggedin}
Welcome {$customcontent_loginname}
{else}
You are not authorized to view this data
{/if}
Do I put this in my template? And how do I determine if they are a client or an employee and what content they see.
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 3:31 pm
by calguy1000
{if $customcontent_loggedin > 0}
{* we're logged in as somebody *}
{if isset($customcontent_memberof_employees) }
Welcome employee
{elseif isset($customcontent_memberof_client) }
Welcome Client
{else}
You're logged in, but not a client or an employee..... who are you
{/if}
{/if}
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 3:39 pm
by wms
Thanks so much for the reply.
Do I put this in my template like this:
{cms_module module=FrontEndUsers} 0}
{* we're logged in as somebody *}
{if isset($customcontent_memberof_employees) }
Welcome employee
{elseif isset($customcontent_memberof_client) }
Welcome Client
{else}
You're logged in, but not a client or an employee..... who are you
{/if}
{/if}
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 3:54 pm
by wms
Ok..I got it down to this time my template:
{if $customcontent_loggedin > 0}
{if isset($customcontent_memberof_employees) }
{content}
{elseif isset($customcontent_memberof_client) }
{content}
{else}
You're logged in, but not a client or an employee..... who are you?
{/if}
{/if}
Where do I put the FEU for the login stuff?
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Fri Mar 30, 2007 4:40 pm
by calguy1000
Put the {cms_module module='FrontEndUsers'} tag anywhere you want. it's smart. If the user isn't logged in, it'll display a login form. If the user is logged in, it'll display links for change settings, and logout actions.
It can be inside this logic, or outside of it. it doesn't matter.
wms wrote:
Ok..I got it down to this time my template:
{if $customcontent_loggedin > 0}
{if isset($customcontent_memberof_employees) }
{content}
{elseif isset($customcontent_memberof_client) }
{content}
{else}
You're logged in, but not a client or an employee..... who are you?
{/if}
{/if}
Where do I put the FEU for the login stuff?
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Sat Mar 31, 2007 12:43 am
by wms
I'm so confused now....it just doesn't seem to be working. Still when I log in as a client, I don't get the content I'm supposed to.
Ex. When I log in as client...I get the standard Welcome Client message on both client & employee pages. Here is what is in my template:
{print showbutton=true script=true}
{title}
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
{if isset($customcontent_memberof_employees) }
{content}
{elseif isset($customcontent_memberof_client) }
{content}
{else}
Who are you anyways?
{/if}
{/if}
Any help would be great.
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Sat Mar 31, 2007 7:49 am
by alby
wms wrote:
I'm so confused now....it just doesn't seem to be working. Still when I log in as a client, I don't get the content I'm supposed to.
Ex. When I log in as client...I get the standard Welcome Client message on both client & employee pages. Here is what is in my template:
{print showbutton=true script=true}
{title}
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
{if isset($customcontent_memberof_employees) }
{content}
{elseif isset($customcontent_memberof_client) }
{content}
{else}
Who are you anyways?
{/if}
{/if}
Any help would be great.
{content} is same for client and employees.
Try with:
Code: Select all
{if $customcontent_loggedin > 0}
{if isset($customcontent_memberof_employees) }
{content block=employees}
{elseif isset($customcontent_memberof_client) }
{content block=client}
{else}
{content}
{/if}
{/if}
and edit, in your page, content client and employees
Alby
Re: FrontEndUsers and CustomContent module help!
Posted: Mon Apr 02, 2007 1:28 pm
by wms
Thanks so much for the responses. It totally makes sense...but (I'm real sorry there is a 'but') it still doesn't seem to work.
I now have this in my template:
{cms_module module=FrontEndUsers}
{if $customcontent_loggedin > 0}
{if isset($customcontent_memberof_employees) }
{content block=employees-access} <-------- page-alias
{elseif isset($customcontent_memberof_client) }
{content block=client-access} <-------- page-alias
{else}
{content}
{/if}
{/if}
When I log in I just get the default "Welcome Client" or Employee appearing on both section.
If you want to check it out to see what it is doing, please goto:
http://linkprotection.ca/index.php and select either the Client or Employee Access page.
Login info for client:
username: client
password: lpmlpm
Login info for employee:
username: employee
password: lpmlpm
Any help would be just great. I'm totally lost on why this isn't working. I have a client that will need this very very soon to be functional.
Thanks so much,
Re: FrontEndUsers and CustomContent module help!
Posted: Mon Apr 02, 2007 1:44 pm
by RonnyK
I just tried and get the correct answer:
client: "welcome client"
employee: "welcome employee"
Ronny
Re: FrontEndUsers and CustomContent module help!
Posted: Mon Apr 02, 2007 1:50 pm
by wms
Yeah you get the Welcome Client or Employee....but these are just default responses from the CC module I'm guessing because my client-access and employee-access pages has content in it that's not "Welcome Client".
And if you log in as client and then go into the Employee Access page, you will see Welcome Client or vice versa.

Re: FrontEndUsers and CustomContent module help!
Posted: Tue Apr 10, 2007 2:40 pm
by wms
...any ideas?
I'm still can't get the two logins to work.
Thanks,
Re: FrontEndUsers and CustomContent module help!
Posted: Tue Apr 10, 2007 3:32 pm
by alby
wms wrote:
...any ideas?
I'm still can't get the two logins to work.
Try with:
Code: Select all
{if $customcontent_loggedin > 0}
{if $customcontent_memberof_employees > 0} <-----
{content block=employees-access}
{elseif $customcontent_memberof_client > 0} <-----
{content block=client-access}
{else}
{content}
{/if}
{/if}
{get_template_vars} <-----
and look for variables result
Alby