schwift
schwift

Reputation: 339

Custom style user profile pages in Drupal 6

I wish to display my tabs (View / Edit etc.) in a sidebar and not on top of the node but only when I am viewing my own profile (maybe when viewing other users profiles too). In my page.tpl.php I have this snippet:

<?php if (!empty($tabs)): ?><div class="tabs-wrapper"><?php print $tabs; ?></div><?php endif; ?>

And I guess it should be something like if (!empty($tabs) && !$user_profile_page) but I can't make it work.

Upvotes: 1

Views: 698

Answers (1)

hross
hross

Reputation: 3671

You want to do this using multiple template files in your theme. In your theme you need to copy page.tpl.php and rename it to either:

 page-user.tpl.php

(theme all user profile pages at once)

 page-user-<id>.tpl.php

(theme a particular user's profile (where <id> is the user id)

Then you just style those particular template files with the tabs you want (no if statements required).

Upvotes: 3

Related Questions