Needs review
Project:
Menu Position
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2012 at 22:14 UTC
Updated:
31 Oct 2013 at 08:57 UTC
Jump to comment: Most recent file
Comments
Comment #1
socialnicheguru commentedthis is a good idea.
Use case:
I have a content type, blog
I click on any on the edit tab
I would like the menu to still be triggered.
right now node/nid/edit is what comes up for the edit tab so I can't create a condition to satisfy it
Comment #2
skylord commentedHere you are a small quick'n'dirty PHP condition plugin. I suggest export more variables (along with $node as now) and may be add access permission... But this simple solution works OK for me. :-)
Patch attached has to be applied to module dir (ver. 7.x-1.1).
Comment #3
capellic@skylord, thank you!!!!
The patch applied cleanly, but only one problem. The two new files (menu_position.php.inc, menu_position.php.js) were added in the module's directory instead of the plugins directory, which is odd given that the patch clearly has the path. I moved the two files, cleared cache and the PHP fieldset and field appear on the rule add/edit form.
This works great. Can we get this patch applied to DEV?
To help others along, here is the code I used to evaluate a multi-value field.
Comment #4
eugene.ilyin commentedLittle notice:
I get error in line:
$apply_rule = eval(trim($php));I think it's because
Source - http://php.net/manual/en/function.eval.php
I wrote few fixes for this patch.
I think this patch will be very useful. Please apply it. I will be very happy if you add me and skylord as commiters of this patch.
Comment #5
johnalbinFeel free to create a separate project for this plugin. I won't add a dangerous PHP-in-the-database feature in this module. Sorry!
Comment #6
eugene.ilyin commentedOk, I created new separate module menu position php, please add link to this module on main page of module menu_position
Comment #7
eugene.ilyin commentedAny news? )
Comment #8
eugene.ilyin commentedHello. Can you add link to my module on page of module menu position?