Override Search Block's "Beneath Another Page" option

Hello Team,

I am trying to override the “form_setup_html.php” (found in concrete/blocks/search/) to see how I can select more pages if the “Beneath Another Page” option is selected. I had a look at the code but I don’t understand how to go about it. I had wanted to override add.php but it uses $this->inc('form_setup_html.php', array('c' => $c)); to call the form_setup_html.php file. I was confused if I should just override that file instead of add.php.

I just need to change the functionality to allow more pages to be selected for the search. Any advice or suggestion will be appreciated. Thank you!

This is my Concrete and PHP version:

concrete5 Version

Core Version - 8.5.7
Version Installed - 8.5.7

PHP Version

7.4.33

There’s more to it than just overriding the add.php file. It sounds like you want to have the search conducted over several pages. You’d need to modify the db.xml to hold those pages, and modify the block controller to respect those extra pages, and ultimately you will need to feed those into the PageList class to effect the search. From a quick look at the PageList, it doesn’t appear to support searching across multiple pages, so you’d need to modify that as well.

I suspect you’d be better off creating your own package with a revised pagelist class in it, and a custom version of the search block with a new block handle, so it doesn’t interfere with the core, given that you’re on a fairly old version that could likely use an update.

2 Likes

Thank you for your response. If you don’t mind, can I request for your email?

If you’ve got any more questions please ask them here.

Thank you for your suggestion earlier. I was able to create a custom PageList class to achieve what I wanted. Now, I am trying to see how I can edit the pagination.

I know it uses Bootstrap and I was able to make some changes via Chrome Inspect. I am trying to apply those changes but I noticed that it is not possible to override a core class in Concrete CMS. I was hoping you had any suggestions on this, @jero?

You can override quite a lot of the core. See Extending Concrete :: Concrete CMS

What exactly are you trying to do?