On Fri, Mar 14, 2003 at 02:28:40PM -0500, Ian Sparks wrote: > Is there some good documentation on OpenTAL. I did some Googling but can't see any > examples of TAL being used outside of Zope. > > Could you write something on using OpenTAL with Webware so we can > get the benefit of your experience? > Even the posting of some examples would help.
To use openTAL in python just
------------------------------------------------------------
from OpenTAL.Static.Directory import Directory
rootSkin = Directory('/somewhere/skins')
# we call the /somwhere/skins/articles_view_form.tal
# with arguments articles = list of article instance
data = rootSkin.articles_view_form(articles = articles )
---------------articles_view_form.tal----------------------
<html>
<div tal:define="articles options/articles">
<span tal:repeat="article python:articles" tal:omit-tag="" >
<b tal:content="article/getTitle">Author</b>
<p tal:content="structure article/getText">Text </p>
</span>
</div>
</html>
------------------------------------------------------------
In fact i have something working w/ Modelign, Webware and
openTAL since today. In fact i hope this will help everyone to
discover openTAL. I really want to push this a next level :
- having a real openTAL support in webware
- building a system to have CMFramework w/ Modeling, openTAL in webware.
I know pretty well Modeling and openTAL (as i work one year
during w/on the Modeling, and i ask Lalo for some changes
in openTAL for better performance in Webware)
But i really need some help about webware, cause i know what
i want to build, but I got some lacks about webware :
- session
- Servlet
- FormKit
- Application
The main reason, I want to do that is that webware is really easy
to use, and have some really great performance :)
Attached you will find a sample code of the stuff. Beaware that
it's my first webware 'apps' so you will find some monkey patching
and other things that doesn't use the standard way of life in Webware
world (simply cause i don't know them)
Requirement:
- latest Modeling
- openTAL CVS
- pax CVS
Thanks for any help
mortal.tgz
Description: GNU Unix tar archive
