contao/test — Issue #1486: Search Reference Page not working
Author: importer
Created: 2011-11-29 08:00:08+00:00
State: open
Labels: Defect, frontend

Hi Leo,

In the search module, it appears you can select a reference page to narrow down the search to include the reference page and its children:

`	// Reference page
if ($this->rootPage > 0)
{
$objTargetPage = $this->Database->prepare("SELECT id, alias FROM tl_page WHERE id=?")
->limit(1)
->execute($this->rootPage);

if ($objTargetPage->numRows)
{
$objFormTemplate->action = $this->generateFrontendUrl($objTargetPage->row());
}
}
`

However, down lower, on line 129, we see this line of code:

`
$arrPages = $this->getChildRecords($objPage->rootId, 'tl_page');
`

and it then seems that we've ignored the reference page. Am I confused as to what the reference page is used for? It seems clear even in the search engine that the capability exists to pass any page as a root page (see line 482-486 in Search class)

Thanks!

Related issues: #949

--- _Originally created by fbliss on February 1st, 2010, at 03:08pm (ID 1486)_