From fc9d4c14b009787af0091e72d81361cc893409bc Mon Sep 17 00:00:00 2001 From: Matteo Date: Wed, 27 Feb 2019 17:37:09 +0100 Subject: [PATCH] Fix widget custom --- src/HTMLBuilder/Manager/WidgetManager.php | 50 +++++++++++++++-------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/src/HTMLBuilder/Manager/WidgetManager.php b/src/HTMLBuilder/Manager/WidgetManager.php index add04c418..4b74d635a 100644 --- a/src/HTMLBuilder/Manager/WidgetManager.php +++ b/src/HTMLBuilder/Manager/WidgetManager.php @@ -153,29 +153,45 @@ class WidgetManager implements ManagerInterface protected function custom($widget) { $result = ' - -
  • - -
    -
    '; - - // Codice specifico - include_once $widget['php_include']; + '; $result .= ' -
    '; - // Icona - if (!empty($widget['icon'])) { - $result .= ' -
    - -
    '; +
    + '; + + if (!empty($widget['icon'])) { + $result .= ' + '; + } + + $result .= ' + + +
    + '; + + if(!empty($widget['php_include'])){ + $result_ob = ''; + + ob_start(); + + include(DOCROOT."/".$widget['php_include']); + $result_ob = ob_get_contents(); + + ob_end_clean(); + + $result .= $result_ob; } $result .= ' -
    -
  • '; + + '; + + $result .= ' + '; return $result; }