25 title = I18nTextLineField(title=_("Title"), |
25 title = I18nTextLineField(title=_("Title"), |
26 description=_("Portlet main title"), |
26 description=_("Portlet main title"), |
27 required=False) |
27 required=False) |
28 |
28 |
29 allow_empty_query = Bool(title=_("Allow empty query?"), |
29 allow_empty_query = Bool(title=_("Allow empty query?"), |
30 description=_("If 'no', no result will be displayed if user didn't entered a search " |
30 description=_("If 'no', no result will be displayed if user didn't " |
31 "string"), |
31 "entered a search string"), |
32 required=True, |
32 required=True, |
33 default=True) |
33 default=True) |
34 |
34 |
35 def has_user_query(self): |
35 def has_user_query(self): |
36 """Check if user entered custom search arguments""" |
36 """Check if user entered custom search arguments""" |
37 |
37 |
|
38 def get_items(self, request=None, limit=None, ingore_cache=False): |
|
39 """Get search results""" |
|
40 |
38 force_canonical_url = Bool(title=_("Force canonical URL?"), |
41 force_canonical_url = Bool(title=_("Force canonical URL?"), |
39 description=_("By default, internal links use a \"relative\" URL, which tries to " |
42 description=_("By default, internal links use a \"relative\" URL, " |
40 "display link target in the current context; by using a canonical URL, " |
43 "which tries to display link target in the current " |
41 "you can display target in it's attachment context (if defined)"), |
44 "context; by using a canonical URL, you can display " |
|
45 "target in it's attachment context (if defined)"), |
42 required=False, |
46 required=False, |
43 default=False) |
47 default=False) |