FIX: do not throw exception when template for menu is not set or does not exist.
This commit is contained in:
@@ -26,7 +26,8 @@ class Presenter implements WidgetRenderer
|
|||||||
public static function render(Widget $widget)
|
public static function render(Widget $widget)
|
||||||
{
|
{
|
||||||
if (!self::$template) {
|
if (!self::$template) {
|
||||||
throw new \ErrorException('Cannot render menu without template! Please, set Presenter::$template variable before rendering.');
|
self::$template = "menu";
|
||||||
|
// throw new \ErrorException('Cannot render menu without template! Please, set Presenter::$template variable before rendering.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$pages = OnePage::getPagesOnHomepage();
|
$pages = OnePage::getPagesOnHomepage();
|
||||||
|
|||||||
Reference in New Issue
Block a user