CRUD
CRUD copied to clipboard
[Bug] Custom Theme default.blade.php Not Loading with Custom View Namespace
this ui config :
this default blade path :
When accessing the admin panel, it should use my custom theme's
default.blade.php as the main layout file.
it take my sidebar and main_hearder but default no ?
Hey @azeddine-hf thanks for the question, there is an issue in the docs.
Please create a file blank.blade.php at the root of your theme folder, similar to https://github.com/Laravel-Backpack/theme-coreuiv4/blob/main/resources/views/blank.blade.php
change the top line to import your default instead of top_left.
I will ask @jcastroa87 to submit a PR to docs to fix the issue 👍
Let me know if that works for you. Cheers
@pxpm it show me error 500
@pxpm
Hey @azeddine-hf try clearing the caches with php artisan view:clear. Also make sure your .env file has APP_ENV=local and APP_DEBUG=true so you should get a nicer error message like:
The view: [backpack.ui::inc.main_header] was not found in any of the following view paths: [theme.inc.main_header ], [ backpack.theme-tabler::inc.main_header ], [ backpack.ui::inc.main_header]
So that you know what files are you missing.
I've just tested it out and it's working:
Cheers
@pxpm thank you it works the error was in @include(backpack_view('inc.bottom')) not exist
@pxpm where data didn't load after set my custom them and i set fallback_theme core_ui2
styles of datatable also not loaded ?? i'm i missed something !
Hey @azeddine-hf most likely your template is missing the @stacks and @yields where backpack pushes the scripts needed for stuff to work, datatables, fields etc.
Make sure your template include those 👍
i have respected the docummentation instrection : `
@include(backpack_view('inc.head')) <!--begin::Main-->
<div class="app-main flex-column flex-row-fluid" id="kt_app_main">
<!--begin::Content wrapper-->
<div class="d-flex flex-column flex-column-fluid">
@yield('before_breadcrumbs_widgets')
@includeWhen(isset($breadcrumbs), backpack_view('inc.breadcrumbs'))
@yield('after_breadcrumbs_widgets')
@yield('header')
<!--begin::Content-->
<div id="kt_app_content" class="app-content flex-column-fluid">
<!--begin::Content container-->
<div id="kt_app_content_container" class="app-container container-fluid">
@yield('before_content_widgets')
@yield('content')
@yield('after_content_widgets')
</div>
<!--end::Content container-->
</div>
<!--end::Content-->
</div>
<!--end::Content wrapper-->
<!--begin::Footer-->
<div id="kt_app_footer" class="app-footer {{ backpack_theme_config('classes.footer') }}">
<!--begin::Footer container-->
<div class="app-container container-fluid d-flex flex-column flex-md-row flex-center flex-md-stack py-3">
@include(backpack_view('inc.footer'))
</div>
<!--end::Footer container-->
</div>
<!--end::Footer-->
</div>
<!--end::Main-->
</div>
</div>
@include(backpack_view('inc.bottom'))
@include(backpack_view('inc.theme_scripts'))
`
Like I told you, it's missing @stacks and @yields.
https://github.com/Laravel-Backpack/theme-coreuiv2/blob/11ec0cbaecefd3272601a7fb0d32457533a09ce6/resources/views/layouts/top_left.blade.php#L46
@pxpm after i set this scripts it still refresh without loading the data :
Check Browser developer tools for possible errors in console/network, I hope you know that just saying "this doesn't work" with an image does not help me much to help you.
Always try to provide any errors that are relevant for the reported bug. 👍