I want to add some flexibility to my layout template, but I can\'t find any way to do so.
I\'m looking for a way to extend my layout template with variable
extend
What you need is an include template tag. You can include a template in another template and render that with specific context.
{% include 'layout.html' with sidebar=True sidebar_width=4 %}
Check docs here: https://docs.djangoproject.com/en/1.9/ref/templates/builtins/#include