[Zope-CMF] Re: CMFFormController & TALES

Geoff Davis geoff at geoffdavis.net
Mon Sep 1 09:28:56 EDT 2003


The TALES expressions are set up with variables that parallel those
available to the variables in actions.  "here" is unavailable, but here's
what you get:

            'object_url':   object_url,
            'folder_url':   folder.absolute_url(),
            'portal_url':   portal.absolute_url(),
            'object':       context,
            'folder':       folder,
            'portal':       portal,
            'nothing':      None,
            'request':      getattr( context, 'REQUEST', None ),
            'modules':      SecureModuleImporter,
            'member':       member,
            'state':        controller_state,

Try python:context.getParentNode().absolute_url()

Geoff

"grendelAI" <grendelAI at msn.com> wrote in message
news:biubrg$1oh$1 at sea.gmane.org...
> Just started trying to implement a simple form page with
CMFFormController.
> Manage to get it up and working; however, I cannot figure out how to
> implement a simple CANCEL button. Specifically, I want the action to
> redirect to the container of the page. I tried using the below TALES
> expression
> but receive an global error on an undefined here variable.
>
> python:here.navigationParent(here, template.getId())
>
> Is it possible to use the here variable inside the metadata properties? Or
> must I use a transfer action to a script that will perform the expression?
>
> What is the common methodology for implementing the CANCEL button?
>
> Help is much appreciated.
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf






More information about the Zope-CMF mailing list