Merge pull request #36556 from thersane-john/fix_webportal_missing_hooks
WebPortal missing hooks
This commit is contained in:
commit
31e1ce2ca6
2 changed files with 19 additions and 1 deletions
|
|
@ -48,6 +48,13 @@ session_cache_limiter('public');
|
|||
require_once __DIR__.'/../../webportal.main.inc.php';
|
||||
dol_include_once('/webportal/class/webPortalTheme.class.php');
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var Context $context
|
||||
*/
|
||||
|
||||
// Define css type
|
||||
top_httphead('text/css');
|
||||
/*
|
||||
|
|
@ -85,5 +92,10 @@ $webPortalTheme = new WebPortalTheme();
|
|||
}
|
||||
<?php
|
||||
|
||||
$hookmanager->initHooks(array('webPortalCustomCss'));
|
||||
$parameters = array();
|
||||
$hookmanager->executeHooks('webPortalCustomCss', $parameters, $webPortalTheme);
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS */'."\n";
|
||||
print getDolGlobalString('WEBPORTAL_CUSTOM_CSS');
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
/**
|
||||
* @var Context $context Object context for webportal
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @@var string[] $vars['body-class'] more CSS classes for body
|
||||
* @@var string[] $vars['body-theme'] theme css to apply default is custom
|
||||
|
|
@ -101,8 +102,13 @@ top_httphead();
|
|||
$bodyAttributes['class'] = $vars['body-class'];
|
||||
}
|
||||
|
||||
$bodyCompiledAttributes = commonHtmlAttributeBuilder($bodyAttributes);
|
||||
$parameters = array(
|
||||
'bodyAttributes' => &$bodyAttributes
|
||||
);
|
||||
$hookmanager->executeHooks('webPortalHeader', $parameters, $context);
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
$bodyCompiledAttributes = commonHtmlAttributeBuilder($bodyAttributes);
|
||||
?>
|
||||
</head>
|
||||
<body <?php print empty($bodyCompiledAttributes) ? '' : implode(' ', $bodyCompiledAttributes); ?> >
|
||||
|
|
|
|||
Loading…
Reference in a new issue