How Not To Show On A Page Of Chunk Of Layout?
I have a common layout to all pages in it, I do include "form search" (search in the header). But on the page "global search" I would not like to display the search.
How to do it nicely? Check the title or route, the only thing that came to mind
Layout -> include (search.form) -> Page
I think your best option here is to utilise
Route::is($name) in your view. This allows you to check if a certain route is being accessed, it does require the use of a named route, however.
Route::get('/search', ['uses' => '[email protected]', 'as' => 'global-search']);
@if ( ! Route::is('global-search')) @include('search.form') @endif
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS - Conditionally Load a Different Page
- → Make a Laravel collection into angular array (octobercms)
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?
- → Validating fileupload(image Dimensions) in Backend Octobercms
- → OctoberCMS Fileupload completely destroys my backend
- → How do I call the value from another backed page form and use it on a component in OctoberCms