Hello,
I set Djano's default layout to the default header,
```
"layout": KTTheme.setLayout("default_header_layout.html", context),
```
But now I can see page content in the middle, how can I stretch to full page width?
Which setting should I change?
Hi,
Apologies for the delay in response. To stretch the page content to full width in Django with the default header layout, follow these steps:
Enable the default layout:
"layout": KTTheme.setLayout("default_header_layout.html", context)
KTBootstrapDefault.initDarkHeaderLayout()
# KTBootstrapDefault.initDarkSidebarLayout()
Hello Faizal,
Thanks for reply, it worked little, but I can still see sidebar there and after all container content shifted down below to sidebar,
I made this 3 changes,
1. in _keenthemes/views.py...
# Define the layout for this module
# _templates/layout/system.html
context.update({
'layout': KTTheme.setLayout('default_header_layout.html', context),
'status': self.status,
})
2. in _templates/layout/bootstrap/default.py.....
# 1) Light sidebar layout (default.html)
#KTBootstrapDefault.initLightSidebarLayout(context)
# 2) Dark sidebar layout (default.html)
#KTBootstrapDefault.initDarkSidebarLayout(context)
# 3) Dark header layout (default_header_layout.html)
KTBootstrapDefault.initDarkHeaderLayout(context)
# 4) Light header layout (default_header_layout.html)
#KTBootstrapDefault.initLightHeaderLayout(context)
# Init global assets for default layout
KTBootstrapDefault.initAssets(context)
3. _templates/layout/default_header_layout.html....
<!--begin::Content-->
<div class="app-content flex-column-fluid">
<!--begin::Content container-->
<div class="app-container">
{% block content %}
{% endblock content %}
</div>
<!--end::Content container-->
</div>
<!--end::Content-->
How to attach an image to show output?
One more thing, if i remove ... {% include './partials/sidebar-layout/_sidebar.html' %} ... from _templates/default.html then the sidebar is not appearing, but why it look for default.html, even though default_header_layout.html is selected?
Apologies for the delay. Please make the following changes only in the specified files:
1. Update the following line in `/django/starterkit/_keenthemes/__init__.py`:
"layout": KTTheme.setLayout("default_header_layout.html", context),
KTBootstrapDefault.initDarkHeaderLayout(context)
Thank you, Faizal, everything works now. :-)
You're welcome Jigar Patel! I'm glad to hear that everything is working now. If you have any more questions, feel free to ask!