Georges Racinet wrote: > > On Feb 14, 2006, at 12:38 PM, bruno desthuilliers wrote: > >> Hello hi, >> >> Two questions about widgets and layouts and schemas... >> >> 1/ I have a member schema with 3 "custom" zones (CPS String fields). I'd >> like to use portal properties to set the labels of the corresponding >> widgets (String widgets or like), so the portal admin can set whatever >> label pleases him. Is there an easy way to do so ? I failed to >> understand exactly how a string widget is rendered (didn't found a .pt, >> and the render() method of string widget seems to only care about the >> content, not the label... or did I miss something ?) > > > Hi, > > The labels are extracted from the widget by the layout zpt (check > layout_lib_div_view for instance).
doh :( I knew this had to be obvious. Thanks. (snip) >> 2/ I have what I thought would be a common use case : for a given (CPS >> String) field, propose the user a selection list *and* a text input for >> values that are not in the list. But I failed to find a widget doing >> this. Does such a beast exist ? > > > I don't think so. > >> Or is this problem best solved by using >> two widgets (a selection and a string widget) and using write expression >> to retrieve the value from the appropriate widget ? > > > I'm not very found of this, because at first sight you'd need two > fields. Nope, just two widgets pointing to the same field, and managing the whole stuff with write_process_expr. Or is this an heresy? > On the other hand, this might be inavoidable since select > widgets store an id in a vocabulary, rather than the end-user string. Woops, I forgot this. Doh again :( Thanks for pointing it anyway. -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com _______________________________________________ cps-devel mailing list http://lists.nuxeo.com/mailman/listinfo/cps-devel
