[Zope3-dev] skin magic weirdness
Roger Ineichen
dev at projekt01.ch
Tue May 10 18:12:52 EDT 2005
Hi Ivo,
Behalf Of Ivo van der Wijk
> Sent: Tuesday, May 10, 2005 4:53 PM
> To: zope3-dev at zope.org
> Subject: [Zope3-dev] skin magic weirdness
>
> Hi All,
>
> I'm currently trying to customize Zope3 skins. I started out with a
> rotterdam customization, as described in Philips book and now I'm
> trying to re-use the Boston skin.
>
> Strange things happen, however. Code that checks if the page macro is
> invoked as 'view' seems to fail with the boston skin:
>
> <metal:block tal:condition="python: macroname == 'view'"
> tal:repeat="pagelets
> pagelets:zope.app.boston.slots.IContextMenu">
> <tal:block metal:use-macro="pagelets" />
> </metal:block>
Does the Skin work if you comment out this metal:block?
> Which causes certain actions (i.e. edit, metadata) not to appear.
>
> I really have no clue why this fails. The actual value for macroname
> is 'page' here (though it *is* 'view' in the exact (?) same case with
> the rotterdam skin.
>
> I've added some debugging tal code - it seems that macroname is always
> 'page' everywhere within boston's template.pt, while it is 'view'
> within the rotterdam skin.
Yes, this could be a bug from me. It could be that this is a mistake
in the pagelet. Perhaps the "commontask" pagelet calls the Adding items
and this will run into a error. I don't remember exactly but the
macroname == 'view' is something I have on my todo list for refactoring.
This was just a quick solution but it needs some better check for display
the IContextMenu pagelets. This will be the next step to implement.
(nested context menus)
> The skin is invoked as 'view', then translated to 'page' in
> zope.app.basicskin.defaultmacros.Macros (I checked with pdb)
>
> I really can't find the difference between the two skins, and still
> they behave differently.
>
> Does anyone have an idea what might be going on here?
>
> Cheers
>
> Ivo
The Boston skin is in a real experimental state right now.
I think I can work on it at the end of this month and finishing
the menu part and implement preferences.
Regards
Roger Ineichen
_____________________________
END OF MESSAGE
More information about the Zope3-dev
mailing list