The component does not support the native search of joomla, so you either search in joomla using com_search and the ?searchword=<term> parameter or you search within a com_datafeed menu using ?q=<term>
If you have a content rich site ( and you all have since the google updates .... ) you might want to search both at once.
Fortunately accessing the joomla native search is quite easy. You can use the code below in either a component or module template.
Code:
<?php
$q=JRequest::getVar('q');
if ( $q ) {
JRequest::setVar('searchword',$q);
JLoader::import('joomla.application.component.model');
JLoader::import( 'search', JPATH_SITE . DS . 'components' . DS . 'com_search' . DS . 'models' );
$search_model = JModel::getInstance( 'search', 'SearchModel' );
$res=$search_model->getData();
if (count($res) ) {
print '<ul>';
foreach ( $res as $v ) {
print '<li>';
print '<a href="'.JRoute::_($v->href).'">'.$v->title.'</a>';
print '</li>';
}
print '</ul>';
}
}
you want to show articles related to some other selection (menu) field.
Assume you have the type of clothing in your menu field 2.
Then replacing the first line with
Code:
$q=JRequest::getVar('q2');
will show articles related to the value of q2
Or related to a displayed item
Code:
$q=$item['Select2'];
but keep in mind that the joomla native search is rather expensive.
This information is about com_search, com_finder is next