0

Hoping to get some advises from experts here regarding the Menu Local Task on user/uid/edit page. You see, I'm taking over a project at the brink of death. I have no idea why they hide all the local tasks tab.

I know that showing it on page.tpl.php is as simple as "print $tabs", however the fact that i am using splitting User/uid/edit pages into two (using EditProfile modules) complicates thing a bit.

My objective here is to show that local tasks (View/Edit Profile/Account Settings/Notification Settings) on templates/edit/edit-acct-settings.tpl.php page.

So far I could make that happen by this line on that template page.

if ($tabs = render(menu_local_tasks())): print $tabs; endif;

But, I'm sure there's a friendlier way to do this. Again, I have no idea how they made the tabs disappear.

And it came rendered as normal list, not tabs. And I dunno how to exactly theme it if it's the current page. Hoping he "Edit Profile" would go bold or something when I'm on Edit Profile page.

rendered result

Any advise appreciated. TGIF!

1 Answer 1

1

Managed to find my solution! This thread here is my saviour: Print primary and secondary tabs separately

In templates/edit/edit-acct-settings.tpl.php page

<?php if ($primary_local_tasks): ?>
<ul class="tabs primary"><?php print render($primary_local_tasks); ?></ul>
<?php endif; ?>

In my_theme/template.php

function mythemename_preprocess_user_profile_form(&$vars) {

  $vars['primary_local_tasks'] = menu_primary_local_tasks();
  $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
}

Hope this helps any other newbies who encounter same issue! Thanks all~

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.