ez.no / exponential / documentation / reference / data fetching / content / search
fetch( content, search,
hash( text, text,
[ offset, offset, ]
[ limit, limit, ]
[ section_id, id, ]
[ subtree_array, array, ]
[ publish_timestamp, time, ]
[ publish_date, date, ]
[ section_id, id, ]
[ class_id, id, ]
[ class_attribute_id, id, ]
[ sort_by, array( 'modified', false() ) ] ) )
| Name | Type | Description | Required |
|---|---|---|---|
| text | string | The text to search for | yes |
| subtree_array | mixed | An array node id's to search under | no |
| offset | integer | Start returning from this offset | no |
| limit | integer | Return maximum this number of objects | no |
| publish_timestamp | integer | - | no |
| publish_date | integer | - | no |
| section_id | integer | Only search in this section. | no |
| class_id | integer | Only search in this class. | no |
| class_attribute_id | integer | Only search in this class attribute. | no |
| sort_by | mixed | Sort the result. See description below. | no |
A hash array containing search information
Will perform a search and return all hits wich the current user has read access to.
The return value is a hash array containing:
The stop word element contains:
Fetch and list all Articles containing the word olympics.
{let�search=fetch(�content,�search, �������������������hash(�text,�'olympics', �������������������������class_id,�2�)�)} ����Search�text�matched�{$search.SearchCount}�matches. ����{section�var=node�loop=$search.SearchResult} ��������<a�href={$node.main_node.url_alias|ezurl}>{$node.name}</a><br�/> ����{/section} {/let}
Log in or create a user account to comment.
Comments