[ic] custom widgets

Ron Phipps rphipps at reliant-solutions.com
Fri Dec 23 18:43:33 EST 2005


> From: Ron Phipps
> Sent: Friday, December 23, 2005 1:52 PM
> 
> I've been looking for documentation on how to create a custom UI
widget.
> This widget will be used to enter product options in the admin
section.
> I would like to use option_format as a starting point, I'll then be
> adding more fields and changing some of the behavior on where the
values
> are stored in the database.  If there is no documentation available
can
> someone give me an idea of what's involved?
> 

I'm answering my own question :)

To add a custom widget create a file such as the following in
code/Widget:

CodeDef testwidget Widget 1
CodeDef testwidget Description Test Widget
CodeDef testwidget Routine <<EOR
sub {
        return "test";
}
EOR

And in mv_metadata add the following to the bottom of
mv_metadata::type:Options

testwidget=Test Widget

IC will use the value before the equals sign as the sub to call for
handling of the widget.  In this widget's case it will just return the
value "test".

-Ron



More information about the interchange-users mailing list