You are here: Home Plone products Products.ATReferenceBrowserWidget

Products.ATReferenceBrowserWidget (2.0.7)

by olena last modified 2011-05-10
Released on 2011-05-09 by Hanno Schlichting under GPL - GNU General Public License available for All platforms.
Software development stage: stable
ATReferenceBrowserWidget is an add-on to Archtetypes. It adds a new reference widget that allows you to search or browse the portal when creating references.

ATReferenceBrowserWidget is an add-on to Archtetypes. It adds a new reference widget that allows you to search or browse the portal when creating references. This new widget inherits from the standard reference widget so you can use all it's properties.

When you use this widget, there are two buttons presented for each widget. One that opens a popup-window that let's you do the search/browsing and one that let's you clear the reference or selected references (will be in effect after the form's Save).

The popop window basically consists of two parts. The top half is a search form and the bottom half is the browser/search results part. Both parts can be turned off or on using the widget's properties.

The search part has additional configuration in the widget (see properties below).


The popup window can be configured using the following widget properties:

  • default_search_index: when a user searches in the popup, this index is used by default
  • show_indexes: in the popup, when set to True, a drop-down list is shown with the index to be used for searching. If set to False, default_search_index will be used.
  • size: in case of single-select widget, the default is set to 30. In case of multi-select, default is 8. 
  • available_indexes: optional dictionary that lists all the indexes that can be used for searching. Format: {'<catalog index>':'<friendly name'>, ... } The friendly name is what the end-users sees to make the indexes more sensible for him. If you do not use this property then all the indexes will be shown (I think nobody should allow this to happen!).
  • allow_search: shows the search section in the popup
  • allow_sorting: allows you change the order of referenced objects (requires multiValued=1)
  • allow_browse: shows the browse section in the popup
  • startup_directory: directory where the popup opens. Optional. When omitted, the current folder is used or in the case where a property refwidget_startupdirectories under site_properties is found it is searched for a startup_directory.
    Property is a lines field having the following format:
    path1 is the path where all widgets being under it set startup_directory to path2 if no startup_directory is set.
  • startup_directory_method: the name of a method or variable that, if available at the instance, will be used to obtain the path of the startup directory. If present, 'startup_directory' will be ignored.
  • restrict_browsing_to_startup_directory: allows you to restrict the breadcrumbs ('allow_browse' property) to contents inside the 'startup_directory' only. So you are not able to walk up in the hierarchy. (default: 0 = disabled)
  • image_portal_types: specify a list of image portal_types. Instances of these portal types are being previewed within the popup widget
  • image_method: specifies the name of a method that is added to the image URL to preview the image in a particular resolution (e.g. 'mini' forthumbnails)
  • show_review_state: allows you to display the workflow state for objects (off by default)
  • show_path: display the relative path (relative to the portal object) of referenced objects
  • only_for_review_states: items are only referencable if their workflow state matches the ones a specified (default: None = no filtering by workflow state)
  • history_length: enable a history feature that show the paths of the last N visited folders (default : 0 = no history)
  • force_close_on_insert: closes the popup when the user choses insert. This overrides the behavior in multiselect mode.
  • base_query: defines query terms that will apply to all searches, mainly useful to create specific restrictions when allow_browse=0. Can be either a dictonary with query parameters, or the name of a method or callable available in cotext that will return such a dictionary.

This add-on comes with an example content type that uses this widget. You can enable the installation of the type by uncommenting the appropriate line in under Extension. See

Document Actions
Powered by Plone