This is an old revision of the document!


Make your plugin compatible to Admidio 4

In Admidio 4 we have changed the way the menu is structured. For this you have to change your plugin if you have worked with $page→getMenu(); before.

Now you don't have to create an instance of the menu to add the single entries there. Also there is now a simple function to add a back button to the page.

So far you had to do the following steps for the back button:

$page = new HtmlPage('My Headline');
$myMenu = $page->getMenu();
$myMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'fa-arrow-circle-left');

Now it's only necessary to call the following function:

$page = new HtmlPage('My Headline');
$page->setUrlPreviousPage($gNavigation->getPreviousUrl());

If you want to add a menu entry to the page than just add this code:

$page->addPageFunctionsMenuItem('menu_item_new', 'Name of Menuentry', ADMIDIO_URL.FOLDER_MODULES.'/groups-roles/groups_roles_new.php', 'fa-plus-circle');

$page→hideThemeHtml(); is replaced by $page→setInlineMode();

  • en/entwickler/make_your_plugin_compatible_to_admidio_4.1594383510.txt.gz
  • Last modified: 2020/07/10 14:18
  • by fasse