I have a layout that looks like this:
body
header.l-header.l-site-width
block header
// include the block with the name body form whatever file that uses layout
.l-body.l-site-width
block body
footer.l-footer.l-site-width
block footer
now i don't specify a header block in the file that is using the layout, i would like to use a default include.
I tried:
block header || "something else"
in the best case:
block header || include ../partials/base/header
it does not work, but does not trow an error. Any idea how to do this?
You can actually just write your default code in the header block.
block header
include ../partials/base/header
If you now extend your layout you can overwrite the contents of the block with a simple standalone block statement.
extends layout
block header
... your code ...
Alternatively you can use append or prepend to add to the block, in this case the old content persists.