logo       

Re: Custom Widgets: msg#00078

web.zope.plone.archetypes.devel

Subject: Re: Custom Widgets

Charlotte:

hmm.. I've implemented custom widgets before, but not that way...

Here is what I did.

In my Schema, I define a macro_view like this:

StringField('foo',
searchable=1,
widget=StringWidget(macro_view='foo_view',),
),


Then in my skins directory put a page template named foo_view and make sure
that there is a macro named view such as:
<metal:define define-macro="view">
<p>foo</p>
</metal:define>

Does this help?

Andrew Williams

"Charlotte Pollock" <c.pollock-8tGg7S+viayFxr2TtlUqVg@xxxxxxxxxxxxxxxx>
wrote in message
news:D16CC7D1-A0DB-11D7-9FCA-000A956C3B16-8tGg7S+viazZG60IdEnuFA@xxxxxxxxxxxxxxxx
Hi

I'm having a problem with using a custom widget.

I have added the line
setattr(self, macro_view, ??)
in the image class in Archetypes/Widget.py and created a widget macro_image
in my plone_skins/custom folder.
However the Widget is not called, I'm pretty sure I did this this way before
but I could be remembering wrongly.

Can anyone help please, I may have gone veering completely of track

Charlotte





-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise