changing widget form class on custom module

22 views
Skip to first unread message

Matthew Penrice

unread,
Mar 10, 2010, 12:24:45 PM3/10/10
to diem-...@googlegroups.com
Hello all,

I've declared a new module thus:

  Flickr:
    photosets:
      model: SfFlickrPhotoSet
      page: true
      components:
        show:
        list:


Done dm:setup. I want to alter the form_class for the list widget but can't work out how. I've added an entry into widget_types.yml like this:

photosets:
  list:
    form_class: photosetsListForm

Yet the form_class is still set as dmWidgetListForm

Any help please??

Matthew Penrice

unread,
Mar 10, 2010, 3:44:00 PM3/10/10
to diem-...@googlegroups.com

Hello all, any help would be great, thanks

thibault

unread,
Mar 10, 2010, 3:51:50 PM3/10/10
to diem-...@googlegroups.com
modules.yml is the right file to define your project widgets.
widgets.yml is used to modify/create built-in widgets.

And it's not yet possible to modify the list widget form for one
precise module! But it's a good idea, I'll ask you to create an issue
for this feature request on http://github.com/diem-project/diem/issues

Matthew Penrice

unread,
Mar 11, 2010, 12:30:01 PM3/11/10
to diem-...@googlegroups.com
yeah, was a little confused as to go about that. I've basically swapped out the dmWidgetTypeManager class and overrode the getWidgetTypes method. Seems to work well. Thanks!

Krapulator

unread,
Mar 25, 2010, 9:35:28 PM3/25/10
to diem-users
So has this been added now? It seems like an essential feature to me.
If I can create a project specific Widget, then in most cases I will
also want to create a form for the front end edit window for the
widget!

On Mar 12, 4:30 am, Matthew Penrice <matthew.penr...@gmail.com> wrote:
> yeah, was a little confused as to go about that. I've basically swapped out
> the dmWidgetTypeManager class and overrode the getWidgetTypes method. Seems
> to work well. Thanks!
>

> On Wed, Mar 10, 2010 at 8:51 PM, thibault <thibault.duples...@gmail.com>wrote:
>
> > modules.yml is the right file to define your project widgets.
> > widgets.yml is used to modify/create built-in widgets.
>
> > And it's not yet possible to modify the list widget form for one
> > precise module! But it's a good idea, I'll ask you to  create an issue

> > for this feature request onhttp://github.com/diem-project/diem/issues


>
> > On 10 March 2010 21:44, Matthew Penrice <matthew.penr...@gmail.com> wrote:
> > > Hello all, any help would be great, thanks
>

> > > On Mar 10, 2010 5:24 PM, "Matthew Penrice" <matthew.penr...@gmail.com>

ced

unread,
Apr 26, 2010, 11:03:36 AM4/26/10
to diem-users


On 26 mar, 01:35, Krapulator <jamesbeat...@gmail.com> wrote:
> So has this been added now? It seems like an essential feature to me.
> If I can create a project specificWidget, then in most cases I will
> also want to create aformfor the front end edit window for thewidget!
>
> On Mar 12, 4:30 am, Matthew Penrice <matthew.penr...@gmail.com> wrote:
>
> > yeah, was a little confused as to go about that. I've basically swapped out
> > the dmWidgetTypeManager class and overrode the getWidgetTypes method. Seems
> > to work well. Thanks!
>
> > On Wed, Mar 10, 2010 at 8:51 PM, thibault <thibault.duples...@gmail.com>wrote:
>
> > > modules.yml is the right file to define your project widgets.
> > > widgets.yml is used to modify/create built-in widgets.
>
> > > And it's not yet possible to modify the listwidgetformfor one
> > > precise module! But it's a good idea, I'll ask you to  create an issue
> > > for this feature request onhttp://github.com/diem-project/diem/issues
>
> > > On 10 March 2010 21:44, Matthew Penrice <matthew.penr...@gmail.com> wrote:
> > > > Hello all, any help would be great, thanks
>
> > > > On Mar 10, 2010 5:24 PM, "Matthew Penrice" <matthew.penr...@gmail.com>
> > > > wrote:
>
> > > > Hello all,
>
> > > > I've declared a new module thus:
>
> > > >   Flickr:
> > > >     photosets:
> > > >       model: SfFlickrPhotoSet
> > > >       page: true
> > > >       components:
> > > >         show:
> > > >         list:
>
> > > > Done dm:setup. I want to alter the form_class for the listwidgetbut
> > > can't
> > > > work out how. I've added an entry into widget_types.yml like this:
>
> > > > photosets:
> > > >   list:
> > > >     form_class: photosetsListForm
>
> > > > Yet the form_class is still set as dmWidgetListForm
>
> > > > Any help please??

hi,
i'd like to know if this have an issue ?


--
Subscription settings: http://groups.google.com/group/diem-users/subscribe?hl=en
Reply all
Reply to author
Forward
0 new messages