Package: plone.formwidget.querystring
IntroductionA z3c.form-based widget for composing a Query string/search.This widget is used by the contentlisting tile and the dexterity-based version
of plone.app.collection (>2.0), to make selections, and ‘build’ your query. It
stores a list of dictionaries containing the query you’ve build. This query is
being parsed by using plone.app.collection and that used
plone.app.contentlisting to display the results in the tile.InstallationIf you install plone.formwidget.querystring, you probably want to use it in
an add-on product for Plone. Therefore you can add it to the setup.py of your
package:install_requires=[
    'plone.formwidget.querystring',
    ...
],You probably want to also use it to the list of dependencies in your generic
setup profile (profiles/default/metadata.xml):<metadata>
  <version>1</version>
  <dependencies>
    <dependency>profile-plone.formwidget.querystring:default</dependency>
  </dependencies>
</metadata>Dexterity WidgetTo assign the plone.formwidget.querystring widget to a field in your custom
content type, you can use a plone.autoform directive in the interfaces
definition (interfaces.py):from plone.formwidget.querystring.widget import QueryStringFieldWidget


class IMyDexteritySchema(form.Schema):

    form.widget(query=QueryStringFieldWidget)
    query = schema.List(
        title=_(u'label_query', default=u'Search terms'),
        description=_(u"""Define the search terms for the items you want to
            list by choosing what to match on.
            The list of results will be dynamically updated"""),
        value_type=schema.Dict(value_type=schema.Field(),
                               key_type=schema.TextLine()),
        required=False
        )NoteSee:: Seehttps://github.com/plone/plone.app.collection/blob/master/plone/app/collection/interfaces.py#L16andhttps://github.com/plone/plone.app.contentlistingtile/blob/master/plone/app/contentlistingtile/tile.py#L18for further examples of how to use plone.formwidget.querystring.CreditsKim Chee LeongRalph JacobsJonas BaumannHanno SchlichtingTimo StollenwerkChangelog1.1.10 (2017-08-09)Bug fixes:Recent Plone 4.3 versions have a change in the base href calculation. Fix
calculation of the baseUrl in updating the queryresults in the widgets if
/edit is part of the base href.
[fredvd, maurits]1.1.9 (2017-05-06)Bug fixes:Make “Remove line” from input.pt translatable1.1.8 (2016-12-19)Bug fixes:Prevent ASCII error for encode/decode in utf8 into converter.
[bsuttor]1.1.7 (2016-08-15)Bug fixes:Use zope.interface decorator.
[gforcada]1.1.6 (2016-05-10)Fixes:Fix way to decode utf-8 into template.
[bsuttor]1.1.5 (2015-07-18)Conditionally setup zope.app.form field.
[vangheem]1.1.4 (2014-11-05)Fix criteria checkbox rendering if value contains non ASCII characters.
[rnixx]1.1.3 (2014-11-01)Fixed sort index selection which was not preserved when editing collection
criteria.
[naro]make compatible with jQuery >= 1.9
[petschki]1.1.2 (2014-04-05)Fixed label for “Add Criteria” (missing id=”addindex”)
[djay]1.1.1 (2014-02-23)AvoidTypeError: ‘NoneType’ object is not iterablewhen the query
of the collection is stillNone, like is the case when adding one.
[maurits]1.1.0 (2013-11-14)Change javascript to work onform-widgets-ICollectionfields instead ofform-widgets.
[maurits, kaselis]1.0b4 (unreleased)If we set background to ‘white’ we should set foreground to ‘black’ to avoid
people getting white font on white background if they use white font color
for their plone sites.  [saily]Add handling of the RelativeDateWidget, already expected to exist in
p.a.querystring.
[tmog]Add jquery dateinput to dateWidget and dateRangeWidget.
[tmog]1.0b3 (2013-02-04)Fixed context for getting ajax results
[kroman0]Fixed conditional initialization of querywidget,
seehttp://dev.plone.org/ticket/12529[kroman0]The widget can now be hidden, when clicking on the
window or the widget. The event is only effective
when the widget is displayed.
[bosim]Translations are now in Plone domain
[bosim]Made the widget a bit more resistent to missing entries, i.e. vocabularies
or in other way indexes. The problem occur if an option is deleted from the
registry but not deleted from the collections in before hand.
[bosim]Update import path for pagetemplate. Now only works with 4.1 and higher
[do3cc]1.0b2 (2012-03-19)Fix sort-reversed checkbox javascript.
[timo]Move docs/HISTORY.txt to CHANGES.txt to apply to Plone conventions.
[timo]1.0b1 (2012-03-09)Stop hardcoding the field name so it works with other field names and
prefixes.
[davisagli]Rename ArcheTypesQueryWidget to Querywidget to avoid confusion.
[timo]Several JSLint fixes on querywidget.js
[timo]Make sure the sorting settings are actually stored on the collection.
[timo]1.0a1 (2011-10-28)Initial release.
[ralphjacobs, kcleong, jbaumann, hannosch, timo]