{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "When deploying a Panel app or dashboard as a Bokeh application, it is rendered into a default template that serves the JS and CSS resources as well as the actual Panel object being shown. However, it is often desirable to customize the layout of the deployed app, or even to embed multiple separate panels into an app. The ``Template`` component in Panel allows customizing this default template, including the ability to rendering multiple components in a single document easily.\n", "\n", "## What is a template?\n", "\n", "A template is defined using the [Jinja2](http://jinja.pocoo.org/docs/) templating language, which makes it straightforward to extend the default template in various ways or even replace it entirely. Before modifying the default template, let us take a look at it in its entirety:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```html\n", "\n", "\n", "{% block head %}\n", "
\n", " {% block inner_head %}\n", " \n", "This is a Panel app with a custom template allowing us to compose multiple Panel objects into a single HTML document.
\n", "This is a Panel app with a custom template allowing us to compose multiple Panel objects into a single HTML document.
\n", "