• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Custom content based on induvidual Front End User
PostPosted: Fri Oct 28, 2011 6:24 am 
Offline
New Member

Joined: Fri Oct 28, 2011 5:40 am
Posts: 4
Hi, I'm wondering if it is possible at all to determine what each individual user sees when they are logged in.
Im using the front end user and custom content modules

I currently have pages which determine what the users see by group; but am wanting to customise it further so that individual users can have a custom screen only to them.

at the minute i am using:
{if $ccuser->loggedin()}
{* content only for users that belongs to a specific group *}
{if $ccuser->memberof('GroupName')}
<div class="companyscreen"> {content block="GroupName" label="Group 1 content"}</div>
{/if}

{if $ccuser->memberof('OtherGroup')}
<div class="companyscreen"> {content block="Other" label="Content for Other Group"} </div>
{/if}
{/if}

is it possible to use a tag such as 'user_name' instead of memberof ?

Thanks in advance for any help.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Fri Oct 28, 2011 5:14 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 11866
Location: Arizona
Asked and answered just a few days ago, please to search...

_________________
Extensions » Modules/Tags click the name of the module/tag or Help to the right to get its parameters.
Right click and view source is a great way to see what you have to work with.
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
Image


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Tue Nov 01, 2011 10:12 pm 
Offline
New Member

Joined: Fri Oct 28, 2011 5:40 am
Posts: 4
Do you mind please posting the link, as I searched for hours and hours and could not find what I was looking for. it would be much appreciated; thanks.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Wed Mar 07, 2012 11:37 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 03, 2009 11:29 pm
Posts: 119
Location: Panama
Hi gstwebdev,

Did you managed to solve this issue? I'm facing the same problem and can't find the post with the solution.

Thanks for any help on this.

_________________
Mr. Bacan.
If heaven gives you lemons, learn how to make lemonade.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Thu Mar 08, 2012 3:56 am 
Offline
Power Poster
Power Poster

Joined: Mon Jun 12, 2006 9:02 pm
Posts: 1904
{if $ccuser->username('the_users_username')}
{* content only for that specific user *}
{/if}


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Fri Mar 09, 2012 4:28 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 03, 2009 11:29 pm
Posts: 119
Location: Panama
jmcgin51 wrote:
{if $ccuser->username('the_users_username')}
{* content only for that specific user *}
{/if}
Thanks for your reply. The issue here is that it only works on a specific user. I have 30 different users and I want each user to go to a personalized page.

How could that be achieved?

Thanks again for your help.

_________________
Mr. Bacan.
If heaven gives you lemons, learn how to make lemonade.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Fri Mar 09, 2012 6:50 pm 
Offline
Power Poster
Power Poster

Joined: Wed Mar 19, 2008 4:54 pm
Posts: 507
after a succesfull login, I would redirect them to a selectionpage with the following code:

{if $ccuser->loggedin()}

{if $ccuser->username('user1')}
{redirect_page page='user1'}
{/if}

{if $ccuser->username('user2')}
{redirect_page page='user2'}
{/if}

{/if}


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Fri Mar 09, 2012 8:32 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 03, 2009 11:29 pm
Posts: 119
Location: Panama
That's what I was thinking staartmees, but then I thought that every time a new user is added, the template must be edited.

Isn't there any tag to get the logged user's username automatically and then pass that as a variable on the redirect?

For example:
Code:
{if $ccuser->loggedin()}

{if $ccuser->username('userid')}
{redirect_page page='userid'}
{/if}

{/if}
Thanks for your help on this.

_________________
Mr. Bacan.
If heaven gives you lemons, learn how to make lemonade.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Fri Mar 09, 2012 8:45 pm 
Offline
Power Poster
Power Poster

Joined: Mon Jun 12, 2006 9:02 pm
Posts: 1904
mr.bacan wrote:
For example:
Code:
{if $ccuser->loggedin()}

{if $ccuser->username('userid')}
{redirect_page page='userid'}
{/if}

{/if}


Even easier:

Code:
{if $ccuser->loggedin()}
{redirect_page page=$ccuser->username()}
{* where the page alias == the logged-in user's username *}
{/if}


You could also do this via userid instead, if you wanted to.

This kind of functionality would best be combined with a UDT that automatically creates a new page (with alias == username) when a user is created. Otherwise it will still potentially be a lot of work for the administrator to create all of the pages.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Tue Mar 13, 2012 6:44 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 03, 2009 11:29 pm
Posts: 119
Location: Panama
jmcgin51 wrote:
Code:
{if $ccuser->loggedin()}
{redirect_page page=$ccuser->username()}
{* where the page alias == the logged-in user's username *}
{/if}
Thanks for your answer, I wasn't able to test it last week. Now that I finally do, it doesn't work, it seems that "{redirect_page page=$ccuser->username()}" has an error, because it breaks my template. If I remove "$ccuser->username()" and put anything else, it works.

Am I doing something wrong?

Thanks again.

_________________
Mr. Bacan.
If heaven gives you lemons, learn how to make lemonade.


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Tue Mar 13, 2012 7:15 pm 
Offline
Power Poster
Power Poster

Joined: Mon Jun 12, 2006 9:02 pm
Posts: 1904
sorry - try just {$username} instead.

so

{if $ccuser->loggedin()}
{redirect_page page=$username}
{* where the page alias == the logged-in user's username *}
{/if}


Top
 Profile  
 
 Post subject: Re: Custom content based on induvidual Front End User
PostPosted: Wed Mar 21, 2012 1:47 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Fri Apr 03, 2009 11:29 pm
Posts: 119
Location: Panama
jmcgin51 wrote:
{if $ccuser->loggedin()}
{redirect_page page=$username}
{* where the page alias == the logged-in user's username *}
{/if}
Thanks a lot jmcgin51, this worked like a charm. Sorry for my delayed answer on this, but I was on a business trip and didn't had the time to test it.

I'll keep making a few tests, but at a first glance it looks like you solved my problem.

Thanks a lot for your time guys.

_________________
Mr. Bacan.
If heaven gives you lemons, learn how to make lemonade.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Arvixe - A CMSMS Partner