This extension provides the possibility to provide and easily use boilerplates for page creation.
The simple mode is enabled by default and can be disabled by the integrator within the extension manager. With this switch the Page Template module will be disabled and a new option in the click menu is enabled. Also she must provide the UID of the storage folder of the page template. An editor now can create pages with content elements within this storage folder.
- Enable simple mode in Extension Manager > pagetemplates
- Add storage PID of your template folder in Extension Manager
Provides yaml based templates for TYPO3 pages. Allows an editor to select a page template for creating a new page. Allows editing of page and content properties on creation. After disabling the simple mode in the extension manager, a new module will be displayed.
Page TSConfig | Default | Description |
---|---|---|
mod.web_PagetemplatesTxPagetemplates.storagePath | Path to the directory containing the YAML configuration files (EXT: syntax is supported) |
Folder structure:
- Templates.yaml
- Structure
- example1.yaml
- example2.yaml
- Structure
Main Templates.yaml file contains the configuration for the available templates:
example1:
name: "Example Template 1"
previewImage: "EXT:pagetemplates/ext_icon.svg"
description: "This is an example template for use in the templates extension."
example2:
name: "Example Template 2"
previewImage: "EXT:pagetemplates/ext_icon2.svg"
description: "This is an example template for use in the templates extension."
The keys are the template identifiers (the file name for the configuration of a single template). Name, previewImage and description are used for displaying a preview of the chosen template.
A single template configuration looks like this:
page:
description: this is a superb description of the template
onCreateEditFields: title,description
defaults:
title: some title
description: and a description
tt_content:
1:
description: This content element should be used for blobbber
onCreateEditFields: header
defaults:
header: a content element header
CType: div
colPos: 0
2:
description: a hidden element which will only be created
defaults:
header: some other content element
CType: div
colPos: 0
3:
description: and a third element
onCreateEditFields: header,subheader
defaults:
header: enter something sensible here, please
CType: textmedia
bodytext: some default bodytext stuff
Be aware that you can only configure tables that are stored directly on the page and have a pid field.
- Click on the module in the main module menu
- Choose a parent page
- Choose a template
- Fill template variables
- Click "Save new page"
- Choose a page in page tree and open the context menu
- Choose "Create page from template"