Overview of the built-in templates
A new Raytha theme comes with a full set of templates, so every page of your site, including login and error pages, already works. This page lists each one, says what it draws and tells you which to edit for common changes.
You find these on a theme's Web templates tab (see Themes and web templates). The tab's Type column marks base layouts Base layout, most other templates Built-in, and the templates you can delete Custom. Home, Content item list view and Content item detail view are Custom: you can delete them. Each template has a label and a developer name; both are given below.
Layouts
Layouts wrap other templates. Edit a layout to change something that appears on many pages.
| Label | Developer name | What it does |
|---|---|---|
| _Layout | raytha_html_base_layout | The frame of the whole public site: the <head> (page title, Bootstrap stylesheet, favicon), the top navigation bar built from the main menu, Login and Sign up buttons (or, for a signed-in visitor, an account dropdown with My profile, Change password, Log out and, for admins, Admin panel), the footer, and the Bootstrap script. Almost every other template sits inside it. |
| _LoginLayout | raytha_html_base_login_layout | A narrow, centered column used by the sign-in, registration and password pages. It sits inside _Layout, so the header and footer still appear around it. |
Common changes in _Layout:
- Site name and logo. The brand in the header is a small icon plus the Organization name from the configuration settings (
CurrentOrganization.OrganizationName). To use a logo, upload it as a theme asset and replace the icon in the template with an<img>tag. - Header links. They come from the main menu. Change them under Menus; see Manage navigation menus.
- Footer text. The copyright line (the year is typed into the template) and the "Powered by Raytha CMS" link are plain HTML. Edit them there.
Templates for site pages
Choose these when you create a site page. Each defines the sections where you place widgets; see Site pages and the page builder.
| Label | Developer name | Sections |
|---|---|---|
| Home | raytha_html_home | hero, features, content, cta |
| Page - Full Width | raytha_html_page_fullwidth | main |
| Page - With Sidebar | raytha_html_page_sidebar | main (wide column), sidebar (narrow column) |
| Page - Multi Section | raytha_html_page_multi | hero, features, content, cta |
Templates for content types
| Label | Developer name | What it draws |
|---|---|---|
| Content item list view | raytha_html_content_item_list | A public list (a published view): breadcrumbs, a header with the view's name and item count, a grid of cards with image, date, title and a short excerpt, and page links when there is more than one page. It shows "No items found" when the list is empty. |
| Content item detail view | raytha_html_content_item_detail | The page of one content item: breadcrumbs, the title, the content type, created and updated dates, a featured image, the body, a Back to link, and a "More from" strip of other items of the same type. Admins also see an Edit in Admin button. |
Important These two templates read fields by name: a field called
featured_imagefor the image and a field calledcontentfor the body and the card excerpt. A content type created in the admin hascontentby default. If your content type has differently named fields, edit these templates, or make copies for that content type, and print your own fields; see How Liquid templates work in Raytha.
You can create more templates and give each content type its own look: copy the Liquid into a new template, edit it, and choose it in the item editor or the view's Public tab. The template's Content types that can use this template setting controls which content types may pick it; Content types created later opens it to future types.
Templates for signing in and accounts
These draw the public account pages. Visitors reach them through the links in the header or through the web addresses shown.
| Label | Developer name | Purpose |
|---|---|---|
| Login with email and password | raytha_html_login_emailandpassword | The Login form, at /account/login. |
| Login with magic link | raytha_html_login_magiclink | The Login form that asks only for an email address, so Raytha can send a one-time code. |
| Magic link sent | raytha_html_login_magiclinksent | The Enter your code page, where the visitor types the emailed one-time code. |
| User registration form | raytha_html_user_registration | The Create account form, at /account/create. |
| User registration form success | raytha_html_user_registration_success | Confirms the account was created and links to sign in. |
| Change profile | raytha_html_changeprofile | A signed-in visitor edits their first name, last name and email, at /account/me. |
| Change password | raytha_html_changepassword | A signed-in visitor changes their password, at /account/me/change-password. |
| Forgot password | raytha_html_forgotpassword | Asks for the email address to send a reset link to. |
| Forgot password reset link sent | raytha_html_forgotpassword_reset_link_sent | "Please check your email for a link to reset your password." |
| Complete forgot password | raytha_html_forgotpasswordcomplete | The page behind the emailed link, where the visitor types a new password twice. |
| Forgot password success | raytha_html_forgotpasswordsuccess | Confirms the new password and links to sign in. |
Which sign-in methods are offered is a setting, not a template choice; see Enable different authentications and single sign-on. The forms post to fixed addresses, so keep the action and field names (such as EmailAddress and Password) when you restyle them. Restyle the surrounding HTML freely. Emails the visitor receives are separate: see Modifying the built-in email templates.
Error pages
| Label | Developer name | When visitors see it |
|---|---|---|
| Error, access denied | raytha_html_error_403 | The visitor asks for something they may not see. The page says "You do not have authorization to access this resource." |
| Error, resource not found | raytha_html_error_404 | The address matches nothing. The page says "The resource you attempted to visit was not found" and shows an error id when there is one. |
| Error, something broke | raytha_html_error_500 | An unexpected problem. The page says "An unknown error has occurred", with an error id and message, and technical detail only in development mode. |
Widget templates
On the Widget templates tab, each built-in widget has a template, with the widget's name as its label:
| Label | Developer name |
|---|---|
| Hero | hero |
| WYSIWYG | wysiwyg |
| Image + Text | imagetext |
| Card | card |
| FAQ | faq |
| Call to Action | cta |
| Embed | embed |
| Content List | contentlist |
Their settings are listed in the widgets reference. Editing one changes every widget of that type on every page.
Gotchas
- You edit your theme's copy. Each theme has its own copy of every template, so editing a template in one theme does not affect another theme.
- Built-in does not mean frozen. You can edit the Liquid of any template. If you break one, use Revisions to revert; see Revisions and publishing.
- The layouts need their parts. A base layout must contain
{% renderbody %}, or the pages inside it have nowhere to appear. The header also loads Bootstrap files from the theme's assets, so keep those assets. - The built-in page and content templates are styled for Bootstrap. They look unstyled in a theme that does not load it.