[development] MENU_LOCAL_TASK for just some node types
David Strauss
david at fourkitchens.com
Thu Jun 5 14:17:34 UTC 2008
I believe you mean *outside* of $may_cache.
-----Original Message-----
From: Michael Favia <michael at favias.org>
Date: Thu, 05 Jun 2008 09:03:26
To:development at drupal.org
Subject: Re: [development] MENU_LOCAL_TASK for just some node types
Lluís wrote:
> I want to make avaliable a local menu for just some node types, how
> can I achieve this?
I think this is development related enough so here goes:
Create a conditional menu item inside of if(!$may_cache) that tests the
node->type against you desired nodes. This will prevent the LMT from
always showing up. If you want to get fancy let the user select the
allowable node types via a settings page and pull the data via
variable_get(). This information applies to Drupal-5 but may be modified
to apply to drupal 6. good luck.
--
Michael Favia michael at favias.org
tel. 512.585.5650 http://www.favias.org
More information about the development
mailing list