Elxis CMS Forum
Support => General => Topic started by: ROUBOS on May 07, 2014, 12:55:59
-
Hi,
I want to hide the right column of my layout, when on a certain autonomous page, in order to give that page more width.
I have done this for a component with the following code
<?php if ($option != 'com_eforum') { ?>
<div id="leftcoln">
</div>
<?php }?>
and I have also been showing how to change the id of part of my layout
<?php if ($option == 'com_eforum') {?>
<div id="maincolnforum">
<?php } else {?>
<div id="maincoln">
<?php }?>
So how do I do it for a certain page?
Do I use the page url like so? :
<?php if ($option != 'our-cars.html) { ?>
thanks
-
In Elxis 4.x you just check the existance and value of ELXIS_ARTID constant.
if (defined('ELXIS_ARTID') && (ELXIS_ARTID == 15)) {
//We are on article page with id = 15
}
In Elxis 2009.x you have to work with the variables $option, $task and $id
global $option, $task;
if (($option == 'com_content') && ($task == 'view')) {
$id = (int)mosGetParam($_REQUEST, 'id', 0);
if ($id == 15) {
//We are on article page with id = 15
}
}
-
that works
(Elxis 2009.x)
but how about the home page?
I dont want it to display a certain <div> when the id is of a certain page, and it works, but it also does not show it on the home page.
why?
-
Frontpage has option = com_frontpage, and no other parameters
-
thanks a lot.
that fixed it :)