Converting HTML files into Templates

Previous answer
Main page of Friday 101
Next answer

Suppose you already have an HTML file that looks just the way you want it to. You simply want to "pour" your FAQ content from Friday into it.

No problem. You simply need to convert your HTML file into a series of templates for Friday to use. Suppose you have a file called MyPage.HTM and want to create a new template set called MyTemplate. Here's how you do it:

Locate the \TEMPLATE folder beneath the folder where you installed Friday.
You'll see several folders within \TEMPLATE already. These are the template sets included with Friday.

Create a new folder called MyTemplate inside the \TEMPLATE folder
This will hold all the files you'll create in the next few steps.

Save your MyPage.HTM file into this folder

View MyPage.HTM in your browser. It may need other files (images, stylesheets, etc) to display properly. You'll need to put all of these files in the same folder with it and possibly edit the paths in MyPage.HTM so that they're all relative; that is, so that they include no path information.

Once MyPage.HTM displays correctly, make copies of it named MAIN.TPL, ANSWER.TPL and (optionally, if you plan to include a Full FAQ) FULLFAQ.TPL

Once you've edited these a bit, they'll become your templates for Main FAQ Pages, Answer Pages and Full FAQ Pages respectively.

Edit MAIN.TPL in your favorite HTML editor.

Wherever you want Friday to insert the list of the questions in your FAQ, add this text:

<A NAME="ListOfLinks"></A>
<START>
<p><A HREF="FAQ00079.htm">Converting HTML files into Templates</A></p>
<END>

Save the file.

Edit ANSWER.TPL and add

:answer:

where you want Friday to insert the answer text.

Save the file.

Optionally, edit FULLFAQ.TPL and add:

<ul>
<STARTFFQ>
<li><a href="#:question.s::">:question:</a></li>
<ENDFFQ>
</ul>
<hr>
<STARTFFA>
<a name=":question.s:"></a>
:question:<br>
:answer:
<hr>
<ENDFFA>

where you want Friday to insert the list of questions and answers for the Full FAQ.

Save the file.

Now start Friday and pick Templates, Choose Template from the menu bar. Your new template should appear on the list of available templates in the New FAQ/Format FAQ Wizard. You can now choose it just like any other Friday template.

Note that there's no reason your MAIN, ANSWER and FULLFAQ templates have to be identical. In fact, you won't want them to be in most cases. You could just as easily start with three different HTML files that you rename to MAIN, ANSWER and FULLFAQ.TPL, then edit as described above.


Filename: FAQ00079.htm
Last edited on 11/1/2004 2:10:20 AM

Naturally, all content & site maintenance by

Friday The Automatic FAQ Maker