Page 1 of 1

Username part of page titel?

Posted: Wed Sep 19, 2007 1:55 pm
by jmansa
I'm using frontend user manager and I am wondering if it's possible to make the first page a user comes to after login be named the same as the user depending on wich user has logged in?

Example.
A user goes to the loginpage and logges in... The Frontend User Manager redirects to a subpage, and the subpage is now called the users name!

I have tryid to insert the {$username} into the page titel, but it only comes out with {$username}!

Can anybody help?

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 2:16 pm
by calguy1000
use {$customcontent_loginname}

also see {get_tempate_vars}

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 2:18 pm
by alby
jmansa wrote: I'm using frontend user manager and I am wondering if it's possible to make the first page a user comes to after login be named the same as the user depending on wich user has logged in?

Example.
A user goes to the loginpage and logges in... The Frontend User Manager redirects to a subpage, and the subpage is now called the users name!

I have tryid to insert the {$username} into the page titel, but it only comes out with {$username}!

Can anybody help?
Not Title but Alias page

In Preferences of FEU, insert in field "PageID/Alias to jump to after login *:"  {$username}

Change in your pages > Option > fiield "Alias:"  UsernameOfUserThatCanSeeThisPage

User jump in this page after login

Alby

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 2:44 pm
by jmansa
Not Title but Alias page
In Preferences of FEU, insert in field "PageID/Alias to jump to after login *:"  {$username}
Change in your pages > Option > fiield "Alias:"  UsernameOfUserThatCanSeeThisPage
User jump in this page after login
Alby
Does that mean that I have to create a page for every user or can I just use the same page for everyone... Cause the idea with the alias being the username is just what I want, but when I tryid to do what you surgested I only got this error back:
couldn't get pageid for Peter
Peter being the username...
I made a page called test, and in the page alias I inserted the "UsernameOfUserThatCanSeeThisPage"

What am I doing wrong?

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 2:50 pm
by alby
jmansa wrote: Peter being the username...
I made a page called test, and in the page alias I inserted the "UsernameOfUserThatCanSeeThisPage"
:) UsernameOfUserThatCanSeeThisPage is fake name

In this case alias of page: Peter

Alby

PS: is prefer lower case always

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 2:54 pm
by jmansa
Again... That means that I have to create a new page for each user, and not be able to use the same page as I first attended!? Is taht possible with the $customcontent_loginname?

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:07 pm
by calguy1000
No you don't have to create a new page for each user.

1) Create a page with the alias 'users_home'
    - mark this page as non-cachable
2) In the FEU Admin Preferences, in the 'page to jump to after login' type:  'users_home'

3) In the template for that page, put some logic like this (untested):

Code: Select all

{capture assign='title'}{sitename} - {title}{/capture}
{if $page_alias == 'users_home'}
   {if isset($customcontent_loginname)}
       {assign var='title' value=$customcontent_loginname} 
   {/if}
{/if}
<title>{$title}</title>

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:24 pm
by jmansa
Ok... Tryid the solution, but only got this:

http://www.mypage.com/index.php/login/users_home

I've done exactly as you described! My template looks like this:

Code: Select all

<head>
{capture assign='title'}{sitename} - {title}{/capture}
{if $page_alias == 'users_home'}
   {if isset($customcontent_loginname)}
       {assign var='title' value=$customcontent_loginname} 
   {/if}
{/if}
<title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *} 


Any idea?

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:31 pm
by alby
jmansa wrote: Ok... Tryid the solution, but only got this:
Excuse me but it's not clear your question.
Please, you can explain better.

Alby

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:38 pm
by jmansa
Ok... Let me try...

I want to make every user I have in my FEU to all be redirected to the same page, but I want either the title or alias, and I preferr the alias to be the users name. Like if "peter" logged in he would be returned to a page called "loggedin", a subpage to "login", but in my html string it would look like this: http://www.mypage.com/index.php/login/peter

Hope that clarifies it... And I apriciate all the help  :D

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:45 pm
by alby
jmansa wrote: Ok... Let me try...

I want to make every user I have in my FEU to all be redirected to the same page, but I want either the title or alias, and I preferr the alias to be the users name. Like if "peter" logged in he would be returned to a page called "loggedin", a subpage to "login", but in my html string it would look like this: http://www.mypage.com/index.php/login/peter

Hope that clarifies it... And I apriciate all the help  :D
For alias I don't see a possibility,
for title apply Calguy reply but in url you have alias always and not title (http://www.mypage.com/index.php/login/ALIAS_PAGE)

Alby

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:50 pm
by calguy1000
Yes, you'll be able to set the page title with the username, but not the alias.

Re: Username part of page titel?

Posted: Wed Sep 19, 2007 3:54 pm
by jmansa
ok... Thanks, Then I have to another way around this, but thanks anyway!