This tutorial introduces working with multiple templates. This tutorial goes under the assumption that you have already taken the previous tutorials and have created your first template which is named "section_default.html".
Using your preferred ASCII text editor, create a new text document.
For our second template, we are going to make a basic homepage. Type the following code (shown in red) exactly as it appears, and save the file as "column_index.html".
<blockquote>
<b>Our Publication</b><br>
<dpQuery issue="this">
</blockquote>
This template will display "Our Publication" with the issue date below it. The query will query the entire issue and list each story from front to back with a linked headline, story summary and author. Please view the Dispatch Reference Guide for additional information on Dispatch tags.
Using your preferred FTP client, connect to your Dispatch FTP host. Upload your new template into the "templates" folder. You do not need to re-upload your first template since it is already in the database, but you still can if you'd like to.
Login to the Template Manager and choose "Import Templates".
Make sure "Existing Set" is chosen, and select "Tutorial" from the drop-down menu.
The "New Templates Found" section should be visible. You will notice the template you uploaded in this list with a drop-down menu beside it. The drop-down menu should be set to your homepage, which is probably "Int: Homepage". If it isn't set on your homepage, please make that change now. Press "next" to continue.
From the end of the Import Templates process or the main Template Manager page, select "Test Templates." Choose the "Tutorial" template set and select a single issue to build from the issues listed.
Uncheck "Show Debugging" if it is checked, and press "Next" to continue.
You should be able to see the output of your templates as the issue is being built. If you see any messages in red that say "warning", please read the warning to see what needs to be fixed and go back to the beginning of this tutorial to double check what you typed in.
When your issue is completed building, click on the provided link. You should see your new "second" template right away. This is the publication homepage. For additional information on Dispatch tags and more elaborate examples of templates, view the Dispatch Reference Guide and site examples. Thank you for taking the "Working With Multiple Templates" tutorial!
|
| Home: Support: Working with Multiple Templates [4 of 4] | Questions? Comments? Post them to the Dispatch Technical Forum. |