Hi,
I have a short question, maybe someone can explain what the “text” after “title” means?
$results = $page->search('my awesome search', 'title|text');
I did’t find a doc for that. Exists for that a list of options?
best David
Hi,
I have a short question, maybe someone can explain what the “text” after “title” means?
$results = $page->search('my awesome search', 'title|text');
I did’t find a doc for that. Exists for that a list of options?
best David
“text” and “title” are the fields that will be searched for “my awesome search”. You can add more fields to consider by adding them with a |
as a separator:
$results = $page->search('my awesome search', 'title|text|excerpt');
If you leave out the second parameter to search all fields of the page:
$results = $page->search('my awesome search');
ahh all right - I thought first that “text” means the content from the field
perfect thanks for the quick answer!