General App Templates

Each page within the general app has its own template to display that page's content.

Where to save template files

Template files will go in a folder that has the same name as the app instance key. For example, if the general app instance key is "app" then you would put all of your template files within the app folder inside the templates folder.

If your theme was called "Custom" then this would be an example folder structure:

  • themes
    • custom
      • theme.json
      • templates
        • home.twig
        • one-column.twig
        • two-column.twig
        • app
          • account-items.twig
          • add-item.twig
          • categories.twig
          • category.twig
          • edit-item.twig
          • home.twig
          • item.twig
          • items.twig
          • search.twig
          • search-results.twig
          • tag.twig
          • tags.twig

App pages and their templates

Below is the list of general app pages and the name of the template file that you should create.

App home

The app home page often shows the app items and/or categories.

Template name: home.twig

Account items

This page shows items that the account holder created.

Template name: account-items.twig

Add item

This page is used to show a form on the public site that allows visitors to add a new item to the app. It can be restricted to only allow logged in users add items. Items added through this form can also be configured to require admin approval before displaying in the list of items.

Template name: add-item.twig

Categories list

This page shows the list of categories.

Template name: categories.twig

Category detail

This page shows the detail information for an individual category. The items assigned to the category are often shown.

Template name: category.twig

Edit item

This is a public page to allow visitors to edit an individual item. Under App -> Settings you can configure whether or not someone has to be logged in to make changes.

Template: edit-item.twig

Item detail

This page shows the full details for an individual app item.

Template name: item.twig

Item list

This page shows a paginated list of app items.

Template name: items.twig

Search

The search page can be used to show the form to search for items.

Template name: search.twig

Search results

The search results page can show the results of an app search. It can show a paginated list of matching items.

Template name: search-results.twig

Tags list

This page shows the list of tags.

Template name: tags.twig

Tag detail

This page shows the detail information for an individual tag. The items assigned to the tag are often shown.

Template name: tag.twig