[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ic] custom widgets


> 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

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.