By brunolovato on
Hi,
Has somebody know how to apply a theme in edit/user in drupal 6? The files user-profile*.tpl.php just has applied to view user profile, not in edit user profile.
Thanks,
Bruno
Hi,
Has somebody know how to apply a theme in edit/user in drupal 6? The files user-profile*.tpl.php just has applied to view user profile, not in edit user profile.
Thanks,
Bruno
Comments
In your theme directory
In your theme directory create the following files
page-user-edit.tpl.php for user edit page
page-user.tpl.php for profile page.
I hope this solves your problem
I did that, but in this case
I did that, but in this case I already have the "html" form edit build. All fields are already in the variable $content. Other bad issues, that if you create categories in User Profile, it cames separet in user edit form, and not in one screen.
In fact, I following the same idea from view profile.
In view profile , drupal gives this files
user-profile-category.tpl.php
user-profile-item.tpl.php
to theme the fields the way that I want.
But, there isn't a file for edit. This didn't has been applyed for edit user.
That is the question, why drupal don't provide a file template to customize the fields before it goes to $content variable?
I believe this is a fault.
Bruno Lovato
template.php
I believe also that that should have a way to intercept the function in template.php, but I don't have any idea how to do that.
If somebody know that, I appreciate some comments... :-)
In template.php
Try this
function themename_theme() {
return array(
'user_profile_form' => array(
'template' => 'user-profile-form',
'arguments' => array('form' => NULL),
),
// other theme registration code...
);
}
In theme create file user-profile-form.tpl.php
If you are using content profile module
Try this
function themename_theme() {
return array(
'XXX_node_form' => array(
'template' => 'user-profile-form',
'arguments' => array('form' => NULL),
),);
}
where XXX = your profile content type name
Aliya Yasir
Co-founder & CTO
YAS Global Inc.
Email: aliya@yasglobal.com
Web: www.yasglobal.com
Thankz
Hey diman1984.10....Workz for me.. I was searching for this for so many dayz..Thank God...I got it...am a newbie...
Hi all, how about for Drupal
Hi all, how about for Drupal 7? I have tried that one above but it doesn't work.
Thanks
Finally, solved! :)
Ah, finally I figured this out.
In your template.php or custom module, put it like this:
Make the template file call user-profile-form.tpl.php, then put the code like this:
Enjoy ;)
Cheers