<?php
$id = '';
if (!empty($this->zoneconfig['conf']['id']))
$id = ' id="' .$this->zoneconfig['conf']['id'] . '"';
$data_melisKey = $this->melisKey;
?>
<div <?= $id; ?> data-melisKey="<?= $data_melisKey; ?>">
<!-- MODAL WITH TABS -->
<?php
/*
* Next, we need to setup your modal if you want to put some specific actions to your tool, in order to display the modal
* we can simply use the Melis Modal Helper
*/
// setup your modal, here you need to put up modal unique identifer, this will be used when invoking your modal
$this->melisModal()->setModalId('modal-language-cms');
// we need to put some contents to your modal, since you have already configured this in the app.tools.php, we can simply call
if(!empty($this->zoneconfig['interface'])) {
foreach($this->zoneconfig['interface'] as $keyConfig => $menuConfig) {
echo $this->$keyConfig;
}
// this is to avoid modal showing all contents of the tabs in one tab, this happens when reloading the zone of the tool
$this->melisModal()->setActiveTab('id_meliscms_tool_language_modal_content_new');
}
elseif(count($this->zoneconfig['interface']) < 1) {
// prompt user with an empty modal
$this->melisModal()->setTabs($this->emptyModal);
}
// tell the modal now to show the close button in the bottom of the modal box
$this->melisModal()->hasCloseButton(false);
// or you can disregard that function, if you don't want to have a close button your modal.
// modal has been setup, time to display it on our view file, this will only show once invoked
echo $this->melisModal()->renderModal();
?>
<!-- END MODAL WITH TABS -->
</div>
|