I would like to create a block with local tasks in, so then i can just postion this block on my site without having to edit any of my theme.

Is it possible to get the local tasks to display in aa lock and how would i do this?
thanks

Comments

pavanouce’s picture

what do you mean by local tasks?

SamSound’s picture

thanks for the response

I mean, the view, edit, contact, track links etc. like here

pavanouce’s picture

You can add new block with the links hardcoded in it. or you can use PHP code input format while creating the blocks to have links generated dynamically based on the menu path.

SamSound’s picture

thanks for helping,

im dont realy know wht you mean by hardcoding, but dnt think it will work because each user has different links for there local tasks, so I would have to create a new block for each user.

Thats what im stuck on, i dnt no what i need to put in the block to load the tasks dynamically.

socialnicheguru’s picture

I am looking for this too

I know how to create a block
But is there a php code snippet to help me determine the menu on the page?
if you can grab the menu and place it in a block great.

if you just wanted to print the tabs
1. create a block
2. make sure input is set to php
3. add

<?php 
 print(menu_local_tasks());
?>

4. you would have to get rid of the tabs uptop using css. if someone can figure hat out and share I would appreciate it.

http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.

palehorsesailor’s picture

I found the code for your problem

print theme_menu_local_tasks(menu_get_local_tasks());

I, on the other hand, have no idea what css to modify.

socialnicheguru’s picture

I tried it and got a fatal error that menu_get_local_tasks is not defined.

I am using d6

http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.

SamSound’s picture

Thanks,
It works if you change menu_get_local_tasks to menu_local_tasks.

manarth’s picture

I found this thread when I googled 'local task block', thinking surely there must be a module for it...

And now there is!
http://drupal.org/project/local_tasks_blocks