Username part of page titel?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Username part of page titel?

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Username part of page titel?

Post by calguy1000 »

use {$customcontent_loginname}

also see {get_tempate_vars}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
alby

Re: Username part of page titel?

Post 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
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username part of page titel?

Post 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?
alby

Re: Username part of page titel?

Post 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
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username part of page titel?

Post 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?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Username part of page titel?

Post 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>
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username part of page titel?

Post 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?
alby

Re: Username part of page titel?

Post 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
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username part of page titel?

Post 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
alby

Re: Username part of page titel?

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Username part of page titel?

Post by calguy1000 »

Yes, you'll be able to set the page title with the username, but not the alias.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
jmansa
Forum Members
Forum Members
Posts: 126
Joined: Thu Oct 19, 2006 2:46 pm

Re: Username part of page titel?

Post by jmansa »

ok... Thanks, Then I have to another way around this, but thanks anyway!
Post Reply

Return to “CMSMS Core”