diff --git a/templates/DoucovaniNeratovice/Handlers/Handler.php b/templates/DoucovaniNeratovice/Handlers/Handler.php index d25cb77a..bd821cbc 100644 --- a/templates/DoucovaniNeratovice/Handlers/Handler.php +++ b/templates/DoucovaniNeratovice/Handlers/Handler.php @@ -4,12 +4,9 @@ namespace Templates\DoucovaniNeratovice\Handlers; use App\Http\Requests\Request; use App\Models\Content; use App\Models\Module; -use App\Models\Widget; use App\Models\WidgetArea; -use App\Models\WidgetInWidgetArea; use Illuminate\Support\Facades\Artisan; use Templates\Base\OnePage\Handlers\OnePage; -use Templates\Base\OnePage\Widgets\OnePageMenu\OnePageMenu; class Handler extends OnePage { @@ -20,6 +17,7 @@ class Handler extends OnePage */ public static function beforePopulatingEditForm(Content & $content) { + // nothing to do } /** @@ -32,6 +30,7 @@ class Handler extends OnePage */ public static function beforeSave(Content & $content, Request $request) { + // nothing to do } /** @@ -44,21 +43,9 @@ class Handler extends OnePage try { Artisan::call('install-module', ['name' => 'StaticPages']); Artisan::call('install-module', ['name' => 'ContactForm']); - Artisan::call('install-module', ['name' => 'Categories']); } catch (\Exception $e) { - // + // ignore message about these modules being installed } - - $area = WidgetArea::create(['name' => 'Top menu', 'code' => 'topMenu', 'deletable' => 0]); - $widget = Widget::create([ - 'widget_type_handler' => OnePageMenu::class, - 'name' => 'Menu', - 'settings' => '{"containerClass": null}', - 'deletable' => 0 - ]); - - // bind widget with widget area - WidgetInWidgetArea::create(['widget_id' => $widget->id, 'widget_area_id' => $area->id, 'position' => 1]); } /** @@ -79,11 +66,11 @@ class Handler extends OnePage return [ [ 'module' => 'StaticPages', - 'templateName' => 'staticpages::adminMenu.templatePath' + 'templateName' => 'staticpages::admin/adminMenu.templatePath' ], [ 'module' => 'ContactForm', - 'templateName' => 'contactform::adminMenu.templatePath' + 'templateName' => 'contactform::admin/adminMenu.templatePath' ] ]; } @@ -92,6 +79,7 @@ class Handler extends OnePage { parent::uninstall($template); - WidgetArea::where('code', 'topMenu')->delete(); + WidgetArea::where('code', 'topMenu') + ->delete(); } } diff --git a/templates/DoucovaniNeratovice/Resources/views/modules/staticpages/visitor/homepage.blade.php b/templates/DoucovaniNeratovice/Resources/views/modules/staticpages/visitor/homepage.blade.php index 05f4d0ba..667c3a83 100644 --- a/templates/DoucovaniNeratovice/Resources/views/modules/staticpages/visitor/homepage.blade.php +++ b/templates/DoucovaniNeratovice/Resources/views/modules/staticpages/visitor/homepage.blade.php @@ -8,7 +8,7 @@

{{$page->title}}

{!! $page->content !!} - @if(isset($extra['pagesRaw'])) + @if(isset($extra['pagesRaw']) && reset($extra['pagesRaw'])) diff --git a/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php b/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php index 81c162e4..87009b98 100644 --- a/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php +++ b/templates/DoucovaniNeratovice/Resources/views/visitor/layout.blade.php @@ -10,8 +10,9 @@ {{setting('pageName')}} - - + + @@ -19,6 +20,26 @@ + + @if(!empty(setting('googleAnalyticsCode'))) + + @endif @@ -45,7 +66,7 @@