Hi all,
Sites does not offer the functionality to show a feature site on the index page. here is my solution
############### Step 1 #############
Open BXSitesModules.php in /modules/boonex/sites/classes/
find:
function serviceIndexBlock()
{
return $this->_getSitesIndex();
}
and add directly below
function serviceFeaturedBlock()
{
return $this->_getFeaturedSites();
}
In the same file find:
function _getSitesIndex()
{
require_once(BX_DIRECTORY_PATH_MODULES . '/boonex/sites/classes/BxSitesSearchResult.php');
$this->_oTemplate->addCss(array('main.css'));
$o = new BxSitesSearchResult('index');
return $o->displayResultBlock(true, true);
}
and add directly below:
function _getFeaturedSites()
{
require_once(BX_DIRECTORY_PATH_MODULES . '/boonex/sites/classes/BxSitesSearchResult.php');
$this->_oTemplate->addCss(array('main.css'));
$o = new BxSitesSearchResult('featuredlast');
return $o->displayResultBlock(true, true);
}
############### Step 2 #############
Go to deanos tools inside your admin panel
add a php block and add the following code
return BxDolService::call('sites', 'featured_block');
save the block.
go to your page builder, move the block into an active element .. and voila
I used featured_last, which i believe will return the last featured website.
I havent tested this thoroughly, so dont use on live site. test it first yourself!
Have fun!