Using BxDolSearch to display search results

Hi!

I've been studying BxDolSearch (and its children BxDolSearchResult) and the Blogs module to display search result for my module.

It's almost working (among other things...). Actually the search is done correctly (verified by displaying the sql query and testing it in phpmyadmin) but it seems that my template is not displayed (even the static content does not appear).

At the end of the displaySearchUnit method, in my own class extending BxTemplSearchResultText, I have:

PHP Code:
$oMain = BxDolModule::getInstance('DagRcpModule');
$sCode = $oMain->_oTemplate->parseHtmlByName('recipe_unit.html', $aUnitReplace);
return $sCode;

(and a file called recipe_unit.html in my templates\base folder of my module.)

Do you have an idea of what could be wrong?

Thanks.

Quote · 15 Mar 2010

Hello!


First of all BxDolSearchResult isn't child of BxDolSearch - their common part - both of them are stored in t fields as normal unit of BxDolModule class. Try to track with var_dump function $oMain content.

Regard

Quote · 15 Mar 2010

You're right it's not a child.

And thanks for the tips. Actually the problem is very simple... I thought I already checked it but...

$sCode = $oMain->_oTemplate->parseHtmlByName('recipe_unit', $aUnitReplace);
instead of


$sCode = $oMain->_oTemplate->parseHtmlByName('recipe_unit.html', $aUnitReplace);

Quote · 15 Mar 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.