Slide Sheet

Last Updated: March 2022

Python API

class tethys_sdk.gizmos.SlideSheet(id='slide-sheet', content_template='', title='', attributes=<class 'dict'>, classes='', **kwargs)

Adds a slide sheet that slides up from the bottom of the page. Add content to the slidesheet by creating an HTML template with the desired content and then providing the path to the template to the template using the template argument.

  • id (str) -- ID of the slide sheet.

  • content_template (str) -- Path to template containing content for the slide sheet.

  • title (str) -- Title of the slide sheet.

Controller Example

from tethys_sdk.gizmos import SlideSheet

slide_sheet = SlideSheet(
    title='Slide Sheet',

context = {
    'slide_sheet': slide_sheet,

Template Example

{% load tethys_gizmos %}

{% block app_content %}
    <button class="btn btn-success" onclick="'{{ }}');">Show Slide Sheet</button>
    {% gizmo slide_sheet %}
{% endblock %}

JavaScript API

The slide sheet can be opened and closed dynamically using the JavaScript API.

Open the slide sheet gizmo with the given ID.

$(function() { //wait for page to load'slide-sheet');


Close the slide sheet gizmo with the given ID.

$(function() { //wait for page to load