10446 Posts in 2223 Topics by 1719 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 730 Views |
-
Embargo/Expiry module and site search results

22 April 2010 at 5:00am
Is it possible to remove pages that should not be shown (defined by the Embargo/Expiry module) from the site search results? I tried the following, but I am still getting pages that should not be shown:
function results($data, $form)
{
$results = $form->getResults();
foreach ($results as $result)
{
if ($result->Embargo != NULL && $result->Embargo < strftime('now'))
{
$results->remove($result);
}
if ($result->Expiry != NULL && $result->Expiry >= strftime('now'))
{
$results->remove($result);
}
}$data = array(
'Results' => $results,
'Query' => $form->getSearchQuery(),
'Title' => 'Search Results'
);return $this->customise($data)->renderWith(array('Page_results', 'Page'));
} -
Re: Embargo/Expiry module and site search results

12 May 2010 at 8:58pm
No one knows how I can use extra fields in the site search? The Embargo and Expiry fields seem to be accessible, but they are returned empty.
| 730 Views | ||
|
Page:
1
|
Go to Top |

