mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.copyDirectory('resources/assets/img', 'public/img');
mix.js('resources/js/app.js', 'public/js');
mix.sass('resources/sass/app.scss', 'public/css');
mix.copyDirectory('resources/assets/img', 'public/img');
/**
* Возвращает контент страницы
* @param int|string $elementId идентификатор или адрес страницы
* @return bool|Mixed|null|string
*/
public function insert($elementId) {
$hierarchy = umiHierarchy::getInstance();
$cmsController = cmsController::getInstance();
$currentElementId = $cmsController->getCurrentElementId();
$elementId = trim($elementId);
if (!$elementId) {
return '%content_error_insert_null%';
}
$elementId = (int) is_numeric($elementId) ? $elementId : $hierarchy->getIdByPath($elementId);
if ($elementId == $currentElementId) {
return '%content_error_insert_recursy%';
}
if (!$elementId) {
return '%content_error_insert_null%';
}
$element = $hierarchy->getElement($elementId);
if ($element) {
$this->module->pushEditable('content', '', $elementId);
return $element->content;
}
return '%content_error_insert_null%';
}
$hierarchy = umiHierarchy::getInstance();
$page = $hierarchy->getElement($page_id);
<?= $page->content ?>