Hi,
I'm using a 3 column template.
In a component I'm coding, I need to make an exception to this 3 column logic on a specific page. In this page I need to put a first bloc over the central and right column, and then under this bloc go back to normal with 3 columns.
I was wondering if there is a way to take control of user1 position inside my component for this use, or if there is another trick I could use.
Thanks in advance for any good advice
Need a trick to override template in 1 page
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
-
- Joomla! Fledgling
- Posts: 2
- Joined: Thu Nov 03, 2005 4:32 pm
- carsten888
- Joomla! Apprentice
- Posts: 27
- Joined: Sat Feb 11, 2006 8:32 am
- Location: Tilburg, Holland
- Contact:
Re: Need a trick to override template in 1 page
your problem has more to do with that you want (if I understand you well) have on one page a componetn outputting in a position (which can be hacked in your template, no prob) but ALSO have other content in the 3 columns layout underneath. having 2 content-outputs on one page is something Joomla can not do.
I can only think of a big fat hack in your template to achieve this.
looking at line 75 -76 in the default rhuk-template:
you can do something like:
but this will only work if the component can handle that kind of include. (In the above example, com_contact can not handle it)
I can only think of a big fat hack in your template to achieve this.
looking at line 75 -76 in the default rhuk-template:
Code: Select all
<div class="clr"></div>
<div id="whitebox">
Code: Select all
<div class="clr"></div>
<div><?php include(dirname(__FILE__).'/../../components/com_contact/contact.php');?></div>
<div class="clr"></div>
<div id="whitebox">
Re: Need a trick to override template in 1 page
I have made a multilanguage website alike this:
template index.php:
could do with "jos_change_template=" in a url... but opensef wich I use does not automaticly add that to every url correctly, so instead I use this to change my template, wich always works, also when a page is loaded first wich does not include any jos_change_template in the url.
perhaps this could help you aswell...
when the url in question is loaded... then display your other template...
could make a different template for every page if you want to...
my index basicly does nothing other then including the right language template file.
every other thing is set in the included files...
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');
}
?>
perhaps this could help you aswell...
when the url in question is loaded... then display your other template...
could make a different template for every page if you want to...
my index basicly does nothing other then including the right language template file.
every other thing is set in the included files...
greetz,
Jonathan
Jonathan