Trails App Templates

Each page within the trails 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 trails app instance key is "trails" then you would put all of your template files within the trails 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
        • trails
          • account.twig
          • account-badge.twig
          • account-badges.twig
          • account-completed-trails.twig
          • account-diary-add-entry.twig
          • account-diary-edit-entry.twig
          • account-diary-entries.twig
          • account-diary-entry.twig
          • account-edit.twig
          • account-favorite-trails.twig
          • account-login.twig
          • account-my-trails.twig
          • account-password-reset.twig
          • account-register.twig
          • account-share-badge.twig
          • account-wishlist-trails.twig
          • edit-trail.twig
          • embed.twig
          • home.twig
          • search.twig
          • search-results.twig
          • trail.twig
          • trails.twig

General pages and their templates

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

Trails home

The trails home page is often used to show a Google map of all trail locations, the search form to search trails and a paginated list of trails. 

The Google map can show the markers for the center point of each trail. Some sites also show the line segments for individual trails as you zoom into the map.

Template name: home.twig

Search

The search page can be used to show the search form to search trails. Alternately you can use the Search Form API to embed the search form on other pages. 

Template name: search.twig

Search results

The search results page can show the results of a trails search. It can show a paginated list of matching trails or you can also display a Google map of matching trails.

Template name: search-results.twig

Trails list

The trails list page is usually a continuation of the paginated list of trails from the trails app home page.

Template name: trails.twig

Trail detail

The trail detail page shows the information for an individual trail. Often a Google map is displayed showing the individual line segments and feature points for the trail. 

Template name: trail.twig

Edit trail

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

While an entire trail can be edited this page is often used to allow your visitors to add additional trail images to a single trail.

Template: edit-trail.twig

Embeddable view

You can allow third-party websites to embed trail information into their websites. This view is used to display the content that is embedded via an iframe into their website.

Template name: embed.twig

Account pages

Public users can log into the website to manage their trails, diary entries and view their badges. Below is the list of account specific trails app pages.

Log in

This is where they will log into their account. 

Template: account-login.twig

Account details

This page is the landing page for the account. It's where they go when they log in if they weren't coming from a password protected page or another page that requires a login. If they were coming from a password protected page or another page that requires a login, then they would be redirected back to that page.

Template: account.twig

Edit account

The account edit page shows a form that allows an account holder to update their profile and login information.

Template: account-edit.twig

Password reset

This page allows the account holder to request a password reset if they are having trouble logging in.

Template: account-password-reset.twig

Registration

Shows a form to allow new account holders to register themselves. 

Template: account-register.twig

Account badges, diary entries, and trails

If the site allows it, account holders can earn badges for completing trails, create diary entries of their trail adventures, wishlist trails, favorite trails, and mark trails as completed. Below are the pages that you can set up for a logged in account holder to view and manage that information.

Account badges

This page shows the list of badges that an account holder has earned.

Template: account-badges.twig

Account badge details

This page shows the details of an individual badge that an account holder has earned.

Template: account-badge.twig

Account completed trails

This page shows the trails that the account holder has marked as completed.

Template: account-completed-trails.twig

Account diary entries

This page shows the list of diary entries that the account holder has added.

Template: account-diary-entries.twig

Account diary add entry

This page shows a form to allow the account holder to add a diary entry for an individual trail.

Template: account-diary-add-entry.twig

Account diary edit entry

Shows a form to allow the account holder to edit a diary entry.

Template: account-diary-edit-entry.twig

Account diary entry

Shows an individual diary entry that the account holder has added.

Template: account-diary-entry.twig

Account favorite trails

This page shows the trails that the account holder has added to their favorites list.

Template: account-favorite-trails.twig

Account my trails

Shows all of the trails that the account holder has completed, added to their wishlist, or added to their favorites list.

Template: account-my-trails.twig

Account share badge

This page allows a single badge for an account to be shared without having to be logged in to view it.

Template: account-share-badges.twig

Account share badges

This page allows all of the badges for an account to be shared without having to be logged in to view them.

Template: account-share-badges.twig

Account wishlist trails

This page shows the trails that the account holder has added to their wishlist.

Template: account-wishlist-trails.twig