[Zope-CMF] Problems with calling portal_actions

Paul Winkler pw_lists@slinkp.com
Wed, 16 Apr 2003 06:43:07 -0700


On Wed, Apr 16, 2003 at 01:38:07PM +0100, Slade Mrs A wrote:
> I'm totally bamboozled with this silly little python interpretation error
> and am hoping someone can help me?  

it's not a python error, it's a TALES path expression error.
 
(snip)
> 1             <div class="subtabs"
> 2                  tal:define="current repeat/tab/index;
> 3                         subnav python:'portal_subcontents' +
> str(current+1);
> 4                         portal_contents actions/subnav|nothing;

Line 4 says "Find actions/subnav (literally!) or nothing."
you need something more like (untested)

    portal_contents python:actions[subnav] or nothing;

or maybe
    portal_contents python:actions.get(subnav, nothing);


sorry, i don't remember the precise idiom.
also, unless actions is defined previously, you'd need to give a 
namespace to search for it - e.g.

    portal_contents python:context.actions.get(subnav, nothing);

HTH,

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's GOD HYPER FIST!
(random hero from isometric.spaceninja.com)