[prev in list] [next in list] [prev in thread] [next in thread]
List: quanta
Subject: Re: [Quanta] QUANTA+ TEMPLATES
From: sol <sol () excaliburworld ! net>
Date: 2006-03-26 22:44:44
Message-ID: 200603261744.44337.sol () excaliburworld ! net
[Download RAW message or body]
On Friday 24 March 2006 07:05, Manuel Martínez wrote:
> Hi:
>
> I'm a newbie with Quanta+. and I want to develop a web application using
> templates, but I don't know how to do this. I have a template created,
> but I don't know how to make new documents based in that template.
>
> Any URL, Manual, Tutorial, etc...????
>
> Thanks.
>
Well, First, make the template. ;)
Then when you want to save it, go to the File menu and select "Save as
Template". I prefer to save my templates in the scope of their project
(rather than making them Global).
The next step is to go to the Templates panel and find your new template.
Right click on it and select "New Document Based on this". If this option is
not available, then select the folder it's in (such as "Project Templates")
and right click on it to view its properties. Select the "Quanta Template"
panel from this Properties window and make sure that "Document Template" is
set.
If you want to be able to update all files that are dependent on the template,
you'll need to use the "dwt.pl" script that comes with Quanta. It's in the
Scripts panel, under Global Scripts.
This script will look for all files that use a template, and then update the
files with the latest version of the template.
It's very fussy about formatting, so I'll explain it:
(The formatting is based on some version of Dreamweaver templates)
<!-- #BeginTemplate template="/templates/main_template.dwt"
codeOutsideHTMLIsLocked="false" -->
This is the tag you use at the begining of the template file. It lets the
script know what template you're using (in this example, the template file is
named "main_template.dwt").
<!-- #BeginEditable "doctitle" -->
This is the tag you use to begin an editable region in the template. (in
this example, the region is named "doctitle", but you could name it
anything).
<!-- #EndEditable -->
This is the tag you use to end an editable region.
The code between the open and close edit region tags will NOT be changed by
the template script. All other code will be modified to match whatever's in
the template.
Running the script is tricky, I found. I couldn't get it to run from Quanta,
so I had to call it from the command line.
Hope that helps, and happy Templating!
sol.
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic