Insert Iframelink In Cmenu

Hi all

Thanks to quickdlgs extension, I have buttons and links opening dialogs for view/create/update action.

Now I need to insert these links (specifically [font=“Courier New”]EQuickDlgs::iframeLink[/font]) inside the operation menu (CMenu) on the right panel, but I can’t and didn’t find anything about it.

Does someone help me?

Thanks…

Well, I found a workaround.

I defined the variable "alternativeMenu" in "components\controller.php" and insert this code in the "views\layouts\column2.php":


if ($this->alternativeMenu) {

    $this->renderPartial('//layouts/_altmenu');

} else {

    $this->widget('zii.widgets.CMenu', array(

        'items' => $this->menu,

        'htmlOptions' => array('class' => 'operations'),

    ));

}

Then the file "_altmenu.php" is something like this:


<ul class="operations">

    <?php

    echo '<li>';

    EQuickDlgs::iframeLink(

            array(

                'controllerRoute' => 'create',

                'dialogWidth' => 600,

                'dialogHeight' => 400,

                'openButtonText' => 'New record',

                'closeButtonText' => 'Cancel',

                'closeOnAction' => true,

                'refreshGridId' => 'scadenza-grid',

                'contentWrapperHtmlOptions' => array('style' => 'height: 100%;'),

            )

    );

    echo '</li>';


    .............

    ?>

</ul>

Now setting the "alternativeMenu" variable in each controller I can decide to show the standard menu or the alternative one.