Re: templates/html generating
Re: templates/html generating
- Subject: Re: templates/html generating
- From: Zak Burke <email@hidden>
- Date: Wed, 26 Jan 2005 09:23:04 -0500
I don't know if this will apply to your situation, but I've
implemented templates and template-switching like this:
* store different HTML templates as header and footer strings in
a DB. Templates may have keywords like ~navigation~ in them
which are dynamically replaced by a regular expression at
runtime. The DB could easily be replaced with a file-reader
that slurped in static HTML files.
* templates are cached in an NSDictionary in Application.java
for efficiency: the templates are loaded from the DB only
once, on application start-up. I have an admin webpage that
refreshes the cache if I need to do so.
* A class extending WOComponent has header() and footer() that
pull different keys from the application dictionary depending
on, say, session variables, or URL params, etc.
* all pages are wrapped in a single WOComponentContent tag, which
refers to the WOComponent affiliated with Template.java and
simply has WOStrings mapped to header() and footer() on
Template.java around the custom content in the middle.
Good luck --
zak.
email@hidden wrote on 1/26/05 3:54 AM:
hello
I ve been working with WO 4 years ago and now i have to make some major
changes to an application developed then. The app is used to build up
static webpages and gives the ability to change almost every layout of
the page via css. Atm the app provides 3 basic (and completly different)
layout formats, which are encoded completly into the WO page. Therefore
including a new layout means a big work to be done.
This behavior must be realised using templates now, in order to give the
customer the possibility to include new layouts nearly on the fly,
without having a developer doing the work.
my questions:
1) does there exist a framework for managing static templates in WO?
2) whats the best way for you to generate static html pages out of this
templates (atm i am using a WOLongResposePage where i generate the html
code via the function GeneratePage of the WO object)?
some more information on the app:
- the customer himself has about 200 customers using the
"web-page-generator"
- one webpage consists of about 90 to 100 pages
- all navigation points can be enabled/disabled
- every text-element on the web page can be changed
- users can upload their own images (and iclude into the page)
- the navigation (3-stepped) is restriced by the application (no new
navigation points are possible) (the structure of the page is defined in
WO/database)
- customers can buy "modules" which are integrated into the webpage
then (newsletters, customer actions....)
any hints on what the right technologie is used atm are very welcome
tia udo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden