Base Template¶
nuit/base.html¶
The base template contains the necessary markup to provide the basic framework elements and styling, and include the CSS and Javascript required for the Nuit interface to function. Most of the time, unless you’re using one of the generic templates listed below, you’ll be extending from nuit/base.html and overwriting the various blocks you require.
Arguments¶
The following arguments can be passed to the extend tag to change the behaviour of the base template:
Default: FalseBoolean that decides whether to display the Left Menu or not.
Default: FalseBoolean that decides whether to display the Right Menu or not.
-
app_title¶ Default: NoneThe name of the application. This is displayed in various places, such as the
<title>element, and as a button on the top bar to take you back to theapp_urldefined.
-
app_logo¶ Default: NoneA more complex application title or logo that can contain HTML elements. This is displayed in a button on the top bar to take you back to the
app_urldefined, and overrides anyapp_titledefined in this location.app_titleis still used in the<title>element.
-
app_url¶ Default: NoneThe base view of the application - this should be a url-reversable string.
Default: FalseWhether to display the breadcrumbs or not. See the Breadcrumbs documentation for more detail.
-
topbar_classes¶ Default: NoneA string containing extra classes to apply to the top bar for this particular page.
-
show_user_info¶ Default: FalseBoolean that decides whether to show the login information on the top right or not.
-
show_search¶ Default: FalseBoolean that decides whether to show the search box on the top right or not.
-
search_view¶ Default: NUIT_SEARCH_VIEWThe view which the search form submits to.
-
search_placeholder¶ Default: NUIT_SEARCH_PLACEHOLDERThe placeholder text for the search box.
-
search_parameter¶ Default: NUIT_SEARCH_PARAMETERThe name of the search parameter.
Blocks¶
The following blocks can be overridden in subsequent templates to customise the content of the template - override these using the standard Django template model:
{% block block_name %}
This is my new content
{% endblock %}
title¶
Defines the title of the page, used in the <title> element.
content¶
The main content of the page. The space that this content fills will be determined by the topbar, leftmenu and rightmenu attributes.
head¶
Allows you to insert content into the <head> of the page.
css¶
Allows you to enter CSS <link> or <style> elements that will be inserted into the <head> element.
scripts¶
Allows you to enter Javascript <script> tags that will be included just before the closing </body> element.
breadcrumbs¶
Allows you to define breadcrumb links. See the Breadcrumbs documentation for more detail.