I’ve been fighting with this for longer than I’d like to admit. All I am trying to do is create a custom page template specifically for the User Profile page, NOT the edit page.
I am doing this from within a module, not my theme. I originally tried page–user.tpl.php but that overwrites all user pages which I don’t want. I only want to override the first page when a user logs in which is the View tab.
I use Display Suite, and noticed that it tells you some suggested templates to use. So I have not begun working with ds-2col–user-user.tpl.php in my custom module but it’s not being recognized.
I am using hook_theme() like this:
function ces_user_registration_theme($ existing, $ type, $ theme, $ path) { $ items = array(); $ items['ds_2col'] = array( 'render element' => 'content', 'template' => 'ds-2col--user-user', 'original hook' => 'ds_2col__user', 'path' => drupal_get_path('module', 'ces_user_registration') . '/templates', ); return $ items; }
I’ve tried a series of this array mashup. At one point when I managed to get user-profile.tpl.php to work but it only worked on the Edit page, which I don’t want to touch. I just want to modify the View.