By shali.nguyen on
I'm trying to change the user page titles from username (var 'name') to the user's FULL NAME which is a custom field I created when registering. How do I change or even just remove the username as a page title and input my own? I can't seem to find the modifier or any file associated to where that information is being inputted anywhere?
Comments
=-=
token and pathauto ? if they can't do it , it may shed some light on how to.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
Multiple options
There probably many ways to do this, personaly I like code as this doesn't require additional modules slowing things down.
Just remember to FLUSH your cache. OTherwise these hooks will never be picked up.
The first function requires a custom module, the second goes in the themes template.php file
Cheers
Alan Davison
www.caignwebs.com.au
Alan Davison
confused still...
Alan,
I'm not really sure where to put this code or how to create a module. Can you elaborate a little bit as I am new to this? thank you so much!!!
=-=
use either or.
since you are new try the second snippet, which goes in template.php of your theme
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
Where do I tell it to use
Where do I tell it to use "full name" instead of username? Right now it is only pulling the username in the profile page. see for reference: http://shalinguyen.com/username.gif
Still a bit to do
Right, I didn't actually give the code to change the username, just the code to hook into the system to allow you to define your own specifications.
So, firstly lets copy the code from theme.inc and rename the theme_ to phptemplete_ and throw that into your themes template.php file and flush the cache. Then do the changes that you require.
The example below just needs the
THE_VAR_FIRST_NAME&&THE_VAR_LAST_NAMEreplaced.You can grab the variable name from the profiles page, (eg "profile_XXXXX")
Let me know if you have any hassles.
Alan Davison
www.caignwebs.com.au
Alan Davison