Topic: Is it Possible to use a seperate main.tpl template for search.php?
Is it Possible to use a seperate main.tpl template for search.php?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 troubleshooting → Is it Possible to use a seperate main.tpl template for search.php?
Is it Possible to use a seperate main.tpl template for search.php?
You can make your own extension if you want.
Just make one with the next thing in it
<hook id="hd_pre_template_loaded">
<![CDATA[
if (FORUM_PAGE == 'search')
{
if (file_exists($ext_info['path'].'/search.tpl'))
$tpl_path = $ext_info['path'].'/search.tpl';
else
$tpl_path = FORUM_ROOT.'include/template/main.tpl';
}
]]>
</hook>
And then put your own search.tpl in that same directory
Download here.
Thanks for your help!
Any idea why when I submit a search it is still pulling includes that the main.tpl uses?
edit;
The "search.php?action=" pages seem to still be using main.tpl - any idea why?
Replace
if (FORUM_PAGE == 'search')
with this code
if (FORUM_PAGE == 'search' || FORUM_PAGE == 'searchposts' || FORUM_PAGE == 'searchtopics')
I will change it in my extension, thanks Slavok, did not think about the rest of the FORUM_PAGE's
This didn't seem to change anything as the search results page as well as the "Active topics" and "Unanswered topics" are still using main.tpl. Only the initial state of the search page seems to use search.tpl...
Is there something I am missing?
Did you download the new version and updated the extension after that?
It seems to work here.
PunBB Forums → PunBB 1.3 troubleshooting → Is it Possible to use a seperate main.tpl template for search.php?
Powered by PunBB, supported by Informer Technologies, Inc.