This tutorial focuses on modifying and editing your first template by
adding style with HTML formatting and additional Dispatch tags.
For additional information on Dispatch tags, please see the
Dispatch Reference Guide.
Open the template we created in the previous tutorial in your preferred ASCII text editor. This template should be named "section_default.html" and should contain the following code:
<dpHeadline>
<dpStory>
<a href="<dpPageForwardUrl>">Page Forward</a>
Templates can be edited and enhanced at any time. For this tutorial we are going to add some HTML formatting and a few additional Dispatch tags. Please type in all of the new additions below (shown in red), so your template looks exactly like the following code. Save your file after you are done. <blockquote>
<font size="6"><dpHeadline></font><br>
<dpStory>
<div align="right"><a href="<dpPageForwardUrl>">Page Forward</a></div> </blockquote>
The code you just typed in contained a combination of HTML and Dispatch tags. The HTML will provide some general formatting, such as font type, font size, bolding, and right alignment. The new Dispatch tags are <dpSubHeadline> which represents the subheadline of the story, and <dpAuthor> which represents the author of the story. 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. Tip: While working on templates, we recommend keeping your FTP client open and logged in. This way you can make edits on your templates, upload, import and build again until everything is exactly how you want it.
Login to the Template Manager and select "Import Templates".
Choose "Existing Set" 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 "Sect: Default Template", based on how you named your template. If it isn't, 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. Press "next" to continue.
You should be able to see the output of your template as it 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, you should see a link to the issue you just built on the bottom of the page. Click the link to browse the issue. Page through the issue and notice all of the refinements and changes that you made to your template. Thank you for taking the "Modifying Your First Template" tutorial!
|
| Home: Support: Modifying Your First Template [2 of 4] | Questions? Comments? Post them to the Dispatch Technical Forum. |