Loading...
 
Themes

Themes


Turn off right/left modules per page

Is there any way to control whether right/left module columns are on/off for particular wiki pages as opposed to all wiki pages. By default I'd like both right and left columns on, but there are particular pages such as "home" that could benefit from a much simpler layout.

Japan

There isn't a simple admin configuration option for this, for individual wiki pages. But it can be done a few different ways (for column visibility; not sure offhand about specific modules) by editing files.

The simplest way is probably to edit tiki.tpl (around line 31 in the default file) to add a conditional statement if $page ne 'Home' ("and if the page isn't Home") something like this:

Copy to clipboard
{if $feature_left_column ne 'n' and if $page ne 'Home'} <td id="leftcolumn" valign="top"> ...


If there are more pages, which would make the statement more complex, it might be better to use another method, such as making a new category and adding the pages to it, then making a new style that mostly duplicates the original but has a "display:none" for the selector of the column you don't want to show. This new theme is then assigned to the new category using Theme Control.

-- Gary


Gary,

Thanks for the reply. I'll play around with your suggested solutions. Both had occurred to me, I was just hoping for something that wouldn't increase my modifications to the basic tiki install. It is helpful to confirm that I am headed down the only possible direction though.

Thanks again,
-Andrew

> There isn't a simple admin configuration option for this, for individual wiki pages. But it can be done a few different ways (for column visibility; not sure offhand about specific modules) by editing files.
>
> The simplest way is probably to edit tiki.tpl (around line 31 in the default file) to add a conditional statement if $page ne 'Home' ("and if the page isn't Home") something like this:
>

>
Copy to clipboard
> {if $feature_left_column ne 'n' and if $page ne 'Home'} > <td id="leftcolumn" valign="top"> > ... >

>
> If there are more pages, which would make the statement more complex, it might be better to use another method, such as making a new category and adding the pages to it, then making a new style that mostly duplicates the original but has a "display:none" for the selector of the column you don't want to show. This new theme is then assigned to the new category using Theme Control.
>
> — Gary
>
>
>

> There isn't a simple admin configuration option for this, for individual wiki pages. But it can be done a few different ways (for column visibility; not sure offhand about specific modules) by editing files.
>
> The simplest way is probably to edit tiki.tpl (around line 31 in the default file) to add a conditional statement if $page ne 'Home' ("and if the page isn't Home") something like this:
>

>
Copy to clipboard
> {if $feature_left_column ne 'n' and if $page ne 'Home'} > <td id="leftcolumn" valign="top"> > ... >

>
> If there are more pages, which would make the statement more complex, it might be better to use another method, such as making a new category and adding the pages to it, then making a new style that mostly duplicates the original but has a "display:none" for the selector of the column you don't want to show. This new theme is then assigned to the new category using Theme Control.
>
> — Gary
>

Could this if statement be phrased to take all pages with Home as the suffix so that my group home pages could end with Home and all have their columns turned off by this one line?


United States

I don't know about using Home as a suffix, but as a prefix it should be pretty easy. Try something like this:

Copy to clipboard
{if $feature_left_column ne 'n' and if ($page|truncate:4:true) ne 'Home'} <td id="leftcolumn" valign="top"> ...


This will only attempt to match the first 4 characters of the page name.

HTH,

-Rick

>
> Could this if statement be phrased to take all pages with Home as the suffix so that my group home pages could end with Home and all have their columns turned off by this one line?
>
>
>

> I don't know about using Home as a suffix, but as a prefix it should be pretty easy. Try something like this:

>
Copy to clipboard
> > {if $feature_left_column ne 'n' and if ($page|truncate:4:true) ne 'Home'} > <td id="leftcolumn" valign="top"> > ... >

>
> This will only attempt to match the first 4 characters of the page name.
>
> HTH,
>

Thanks Rick,

I think that will help, I'll give it a try.

-trewdy