Hi,
I suppose there are a few ways you could go about doing that without delving too much into code:
- that $pager variable (with the results) is set on the corresponding action of the module. In this particular case, it is set in the RepositoryBrowseAction class, located at /apps/qubit/modules/repository/actions/browseAction.class.php.
You can replicate the code (or part of it) in the plugins/themeName/modules/staticpage/actions/homeAction.class.php, which will make the variable available to the template, hence you can pass it down to the partial.
You can strip most of the code depending on what you want to include on the home page. By removing the order, filters, subqueries, etc, it basically boils down to including the following code inside the execute function (right before the ending bracket):
$this->limit = sfConfig::get('app_hits_per_page');
$this->search = new arElasticSearchPluginQuery($this->limit, 0);
$resultSet = QubitSearch::getInstance()->index->getType('QubitRepository')->search($this->search->query);
$this->pager = new QubitSearchPager($resultSet);
$this->pager->setPage($request->page ? $request->page : 1);
$this->pager->setMaxPerPage($this->limit);
$this->pager->init();
- another way is to copy the generated HTML if the repositories are rarely changed.
- or make an ajax call to the browse repositories page, scrape the HTML "masonry" section, and add it to the home page content.