Ok i will explain what I'm trying to do
The path to
edit a Evo plugin is something like
manager/index.php?id=103&a=102
Where
103 is the
plugin id
So i want to convert it in something like
manager/index.php?id='.$pluginid.'&a=102
To add a link to edit my EvoDashboard widgets:
This is the code of my "test Widget"
/**
* WelcomeTestWidget
*
* Events: OnManagerWelcomePrerender,OnManagerWelcomeHome,OnManagerWelcomeRender
*
* Configuration: &WidgetEvoEvent= Widget Box placement:;list;OnManagerWelcomePrerender,OnManagerWelcomeHome,OnManagerWelcomeRender;OnManagerWelcomePrerender &WidgetBoxSize= Widget size:;list;dashboard-block-full,dashboard-block-half;dashboard-block-half &WidgetTitle= Widget Title:;string;Test Widget &WidgetChunk= Widget Chunk:;string;WidgetChunkName
****
*/
// Run the main code
//blocks
$WidgetOutput = isset($WidgetOutput) ? $WidgetOutput : '';
//events
$WidgetEvoEvent = isset($WidgetEvoEvent) ? $WidgetEvoEvent : 'OnManagerWelcomePreRender';
// box size
$WidgetBoxSize = isset($WidgetBoxSize) ? $WidgetBoxSize : 'dashboard-block-full';
//widget grid size
if ($WidgetBoxSize == 'dashboard-block-full') {
$WidgetBoxWidth = 'col-sm-12';
} else {
$WidgetBoxWidth = 'col-sm-6';
};
//Get plugin id
$pluginid = intval(basename(__FILE__));
/*Evo Event */
$output = "";
$e = &$modx->Event;
if($e->name == ''.$WidgetEvoEvent.'') {
/*Widget Output */
$WidgetOutput = '<div class="'.$WidgetBoxWidth.'"><div class="widget-wrapper"> <div class="widget-title sectionHeader"><i class="fa fa-globe"></i> '.$WidgetTitle.' <a href="index.php?id='.$pluginid.'&a=102"><i class="fa fa-pencil-square"></i>
</a></div>
<div class="widget-stage sectionBody"> bla bla bla </div></div></div>';
}
//end Widget
$output = $WidgetOutput;
$e->output($output);
return;
?>