Any help here will be appriciated...
Basically I need the search module to display search results on a different template than where the search was initiated. I know this is probably not possible standard (unless I'm over looking something obvious) but I figure there has to be a way.
Thanks again!
Search Results, Different Template?!
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
-
- Joomla! Fledgling
- Posts: 1
- Joined: Sat Mar 08, 2008 10:53 pm
Re: Search Results, Different Template?!
I have made a multilanguage website alike this:
template index.php:
all you would need to do, is find that if searchresults are displayed (look in the $_GET or $_POST for the search is set or so) then include your other template file.
I had the wish of altering the template from within a component as well (just not com_search, in my case a selfmade).
And found that in order to do that, I had to make a hack to joomla core files.
Rather I set the right template from within the template itself, in order to prevent any corehacks.
since this post is in a coding forum I suppose you know how to do the rest.
template index.php:
Code: Select all
<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$string = $_SERVER['REDIRECT_URL'];
if(strpos($string, 'Russian') || $string == '/RU.html'){
include('ru.php');
} elseif(strpos($string, 'English') || $string == '/EN.html') {
include('en.php');
} elseif(strpos($string, 'German') || $string == '/DE.html') {
include('de.php');
etc... many other languages .....
} else {
include('nl.php');
}
?>
I had the wish of altering the template from within a component as well (just not com_search, in my case a selfmade).
And found that in order to do that, I had to make a hack to joomla core files.
Rather I set the right template from within the template itself, in order to prevent any corehacks.
since this post is in a coding forum I suppose you know how to do the rest.
greetz,
Jonathan
Jonathan