I'm using D7.
I'd like to theme the separate page for editing profiles provided by Profile2 module(whose URL is MYWEBSITE.com/profile-MYPROFILE/[uid]/edit).
I searched and found the way that somebody has already suggested. And, by reference to that, I tried the way below. But it doesn't work. Can anybody tell me where I made a mistake?
Here is the way I tried but that didn't work...
1st: Create the customthem_theme() below into template.php file of customtheme theme.
function customtheme_theme() {
$items = array();
$items['user_profile_form'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'customtheme') . '/templates',
'template' => 'user-profile-form',
'preprocess functions' => array(
'customtheme_preprocess_user_profile_form'
),
);
return $items;
}
2nd: Create the template file user-profile-form.tpl.php and place it in the templates folder of custometheme.
3rd: Code the fields I want to display on user-profile-form.tpl.php
for ex
<html>
<?php
print drupal_render($form['form_build_id']);
print drupal_render($form['form_id']);
?>
<div>
<?php print render($form['profile_MYPROFILE']['field_MYFIELD']); ?>
</div>
</html>
I'm still very new to drupal and, honestly, don't figure out how its system works yet. I'm sorry if this is a very easy mistake to you. Thanks.