开发者

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"&开发者_如何学Pythongt;<?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.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜