Boonex Sites Featured Block on HomePage

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!


Quote · 3 Apr 2011

Already found an error.

If i click on the next site, it will not work.

So .. if someone can help a bit, that would be great :-)

Quote · 3 Apr 2011

Is there a way to just do this randomly and dont give the next button as an option?

Quote · 3 Jul 2011
 
 
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.