Templates are basically skeleton documents, code snippets and files to link to. Quanta Plus uses templates fundamentally as a standard file system with enhanced organization and interfacing. You can copy, move or link any repository currently on your system into the templates tree. Think of Quanta Plus templates as having roughly the limitations to your imagination that your file system has.
Templates exist in nested folders. There is no limit to how deep you can nest them, however, within any given folder Quanta Plus expects a consistent action for the base template type described below. Additionally templates allow for pre and post text to be concatenated to non document type templates. This facilitates tag creation. The next update after the introduction is scheduled to add the ability to pass variables to the text such as image size information to assist in tag creation.
Our goal with templates is to extend them to include multi file “concept” templates useful for things like placing an order or creating an about section. Ideally this will be a tool for making your work more productive and dynamic. An eventual goal is to have a structural template design mode to deal with site layout and structure which you could use to design and interactively update your sites. If you would like to be involved, check out our help wanted page.
Some of the templates that ship with Quanta Plus have conditions for their usage. Please read carefully the usage statement of conditions at the top of each template before you use it.
There are various template types supported by Quanta Plus. These are:
Binary templates |
Document templates |
Text snippets |
Site templates |
Binaries are anything not identified purely in text. They can be any file,
except text, including images, PDFs, flash files, etc. Binary templates
are usually included in your document via links (that is, images as
an <img src=/src/url>
).
Some examples can be found in the Templates tree under Global Templates.
Please see the section called “The Toolviews” for more information on the
Templates tree.
Documents can be any type of text document. You can create new documents based on these templates. Generally you would want to nest more specific or diverse documents in subfolders. Here you can make a basic framework for what you do and deliver it to your work in an organized fashion and realize much better efficiency. Some examples can be found in the Templates tree under Global Templates. Please see the section called “The Toolviews” for more information on the Templates tree.
This type of template is useful when you don't want to create a new document based on a template, but want to insert the same text area over and over in your documents. They can contain anything, starting with a comment and ending with a complete menu handling JavaScript method or perl script. Some examples can be found in the Templates tree under Global Templates. Please see the section called “The Toolviews” for more information on the Templates tree.
As the name says these templates are useful to build a whole site from a template. They are a collection of various documents which can be organized in a directory structure, everything gathered in a compressed tar archive. As of writing there are no example site templates in Quanta Plus.
Templates are accessible based upon their established workspace in Quanta Plus
Create a document structure that you love (XML, HTML, DocBook, etc..) and click on ->->.
Once this is done, you will notice that (even if it is saved as a Project template) the template does not show in the project tab view. Look into the templates view to find your template under the Project templates tab.
Select some text in your document and click on ->->. Alternatively you can just use drag and drop to drag the selection to the Templates treeview.
Creation of a binary template is simple: just copy the file into a template folder. You can use standard file management functions to do it, like drag and drop or copy and paste from Konqueror or the Files Tree.
In the Files Tree or the Project Files treeviews right click on a folder and select Create Site Template, pick up a name for the template and save it. By default it will try to save to the project template folder, but of course you can choose to save it as a local or global template as well.
Project templates allow you to be more tightly focused. You can create headers, footers or go dynamic with PHP include files and link them. Additionally there are some very cool things we took into consideration when using templates in projects.
When creating a project you can opt to copy to your local project, all the existing global and user templates. Legacy project get default templating abilities so nothing is lost You can choose where to locate your template files so they can be in your server root and easy to upload or you can make them secure to link to below server root which is a very cool trick. When linking to a file not in the project templates you will be prompted to copy the file to the project templates prior to linking. This will prevent broken links on upload. You always have control where you place your templates so you can choose to move them. However Quanta Plus does not track this so you will need to change links.
Template structure on the template tab is based on the files found in
$
and
TDEDIR
/share/apps/quanta/templates
$
. Each of
these folders is specified as one of four types of container as explained above.
HOME
/.trinity/share/apps/quanta/templates
To set the behavior of each folder, . The following dialog will come up:
mouse button click in the template view on the folder and chooseProperties dialog.
Drop down box with the three types discussed previously; files, text, template. This box will be grayed out if you have the Inherit parent attribute box checked.
<foo>
)
This is checked by default and is fine for all but the top level
folders in your templates tree. If the top level folder has this
checked, it will basically deactivate templates for that folder and all
that aren't explicitly set below it. If this is not a top level folder,
then the <blah>
will say something like
Text snippet
. If it says nothing, then chances are that
you are on a top level folder.
Enables pre and post text for templates in this folder. This could be a common header/footer for all of your templates for a given project and then you copy content templates into that folder and have a complete page with the custom header/footer as a starting point.
The actual text to insert before your templates content.
The actual text to insert after your templates content.
Additionally if you look at your options with the
mouse button you will see complete file management tools for creating folders or copying and pasting templates from one location to another.
Would you like to comment or contribute an update to this page?
Send feedback to the TDE Development Team