php - laravel 4 - how to show and hide components in blade? -


I have breadcrumbs in the master.blade.php file and I want to use breadcrumbs everywhere but the homepage Blade Php.

Just like this, I add links to breadcrumbs in other pages like "About". About.blade.php:

@section ('breadcrumbs') @ parent & lt; Li class = "last-breadcrumb" & gt; & Lt; / Li & gt; About @stop

:

  in Master.blade.php < Div class = "container" & gt; & Lt; Div class = "breadcrumbs-container" & gt; & Lt; Ul class = "breadcrumb" & gt; @part ('breadcrumb') & lt; Li & gt; & Lt; A href = "/ homepage" "title =" homepage "& gt; homepage & lt; / a & gt; & lt; / li & gt; @ show & lt; / ul & gt; & lt; / div & gt; ; & Lt; / div & gt;  

But I do not want to display the breadcrumb code exactly when homepage.blade is used.

Every about Copying the code for .blade / x.blade files look like a bad idea.

You You can set a value in your controller that you create / redress like the $ data ['breadcrumb'] = true true

The blade template

  
@ if ($ breadcrumbs)

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -