zpt

How do I check if it's the homepage in a Plone website using ZPT?

I want to change my website's header only it if's not the homepage. Is there a tal:condition expression for that? I've been reading this and can't find what I'm looking for... thanks! ...

plone + formlib: how to reference form.pt

I'm working on plone 3.2.1 and I've made a formlib's form with a custom template: from Products.Five.formlib import formbase from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile ... class MyForm(formbase.PageForm): ... template = ViewPageTemplateFile('myform.pt') I want to make a simple change to the stand...

Validating Google Optimizer javascript code via HTMLParser

I'm trying to include the Google Website Optimizer JavaScript code, below, in a Zope3 page template. It's used for for A/B testing. However, the template html parser, which I believe is the standard Python HTMLParser module, throws the following error: raise PTRuntimeError(str(self._v_errors)) - Warning: Compilation failed - Warning: <...

FBML and HTMLParser error

The below code: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en"> <head> <title>FB Test</title> </head> <body> <a href="#" onclick="FB.Connect.inviteConnectUsers();">Test</a> <fb:serverfbml style="width: 350px;"> <script type="text/fbml"> ...

Custom traversal and page templates

Using Marius Gedminas's excellent blog post, I have created a custom traverser for a folder in my site. This allows me to show: http://foo.com/folder/random_id Instead of: http://foo.com/folder/object.html?id=random_id The configuration side works great, I can catch the random_ids and search through my messages for the correct one, re...

Using ZPT in Google App Engine

Has anyone tried using ZPT in Google App Engine? If yes, please let me know how. Thanks in advance. EDIT: An example at http://gae-zpt.appspot.com/ by DisplacedAussie http://stackoverflow.com/users/2962/displacedaussie It can be downloaded from http://github.com/displacedaussie/gae-zpt I can now happily run at: http://blogthere.apps...

How can I get an ISO date (not localized) from a PloneFormGen results template?

How do I get an ISO date (2010-01-01 00:00:00), in addition to the localized date, in a PloneFormGen mailer template? ...

How to make a file with .pt extension, with xml syntax highlighting and vim's plugin snipmate load pt.snippets?

I have the following in my .vimrc: au BufNewFile,BufRead *.pt set filetype=xml This is needed because although I'm editing a file with *.pt extension, it's indeed a valid xml file: setting the filetype like this I can have syntax highlighting. I'm using vim's snipmate plugin, and tried to create pt.snippets to specific needs since th...

zpt xml-schema definition

Where can i find xml-schema definition for ZPT attribute language? ...

Plone: How use the html5 video tag with content types?

I have a zpt (zope page template), where I want to use a video tag, something like: <video src="FILE_LOCATION" width="320" height="240" type='video/ogg; codecs="theora, vorbis"' controls></video> where FILE_LOCATION would be a content type of plone. I can use either 3 ways to acces the file: 1) file.download_url #gives me: http://loc...