[support] (no subject)
felix arteaga
fxarte at gmail.com
Tue Feb 19 15:25:19 UTC 2013
For more details go here: *
http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7
*
but basically you need to add an extra index to your menu items array with
the key: *"menu_name", which by default it is set to navigation, or the
main navigation menu.*
Assuming you want them on the primary links menu:
*::*
*$links = array(
'workflow_overview_add_state' => array(
'title' => t('Add state'),
'href' => "admin/config/workflow/workflow/state/$workflow->wid",*
* 'menu_name' => 'main-menu'
),
*
*::*
*::*
*
*
On Fri, Feb 15, 2013 at 8:44 AM, Ms. Nancy Wichmann
<nan_wich at bellsouth.net>wrote:
> I have this code in my hook_menu(), and it works just like I would like.
>
> foreach (workflow_get_workflows() as $workflow) {
> $items["admin/config/workflow/workflow/$workflow->wid"] = array(
> 'title' => check_plain($workflow->name),
> 'weight' => $workflow->wid,
> 'access arguments' => array('administer workflow'),
> 'page callback' => 'workflow_admin_ui_overview',
> 'page arguments' => array(4),
> 'type' => MENU_LOCAL_TASK,
> );
> // @TODO: Put "links" here as MENU_LOCAL_ACTION items?
> }
>
> I'd like to turn these links into action links at the top of each of the
> pages above.
> I created a menu item with MENU_LOCAL_ACTION but they didn't show up.
> $links = array(
> 'workflow_overview_add_state' => array(
> 'title' => t('Add state'),
> 'href' => "admin/config/workflow/workflow/state/$workflow->wid",
> ),
> 'workflow_overview_edit' => array(
> 'title' => t('Edit'),
> 'href' => "admin/config/workflow/workflow/edit/$workflow->wid",
> ),
> 'workflow_overview_delete' => array(
> 'title' => t('Delete'),
> 'href' => "admin/config/workflow/workflow/delete/$workflow->wid",
> ),
> );
>
> Does anyone have any tips on this? Do they have to be exactly the same
> path with an argument
> on the end?
>
> *Nancy*
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130219/b19e9674/attachment.html
More information about the support
mailing list