Page 1 of 1

[Solved] Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 6:56 pm
by libralion
Hi everybody,
I am testing a template with a rightcolumn. But on the reservation page I want this rightcolumn to be removed so that I have more room for the reservation form. Is that possible? And if so how can I do that?
Here is my testsite:
http://www.jomedio.nl/cmsmadesimple/

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 7:03 pm
by RonnyK
libralion,

the easiest would be making a copy of the template and remove it in that template. Modifying a copy of the stylesheet to justify the new space could be attached to that template.

Then create the page and attach that to the new template instead of your default template..

Ronny

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 7:13 pm
by Dr.CSS
There is a way to give the wrap a class of the page alias so you could use CSS to not display the right column and make the center column wider, but yes most times it's easier to just make a copy of the template and change the id of the the divs and restyle them...

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 7:22 pm
by libralion
Hi Ronny,
Thanks I will try that. Maybe a stupid question, but I can't find where I can attach the template to the page? I only find the option to set all pages to a template, but can't find where I can attach a template to a page?
@Mark, thanks for your input.

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 7:30 pm
by RonnyK
On the inserting/editing of a page, there is the template connection as well, just above the content-block....

Ronny

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 7:38 pm
by libralion
RonnyK wrote: On the inserting/editing of a page, there is the template connection as well, just above the content-block....

Ronny
Hi Ronny,
Yes I saw it. But you only can do that when you create a new page.
Great! I have it working now. The layout still will be a puzzle, but I know now how to do this.
Thanks! ;D

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 7:57 pm
by christiaans
Just wanted to give a shout too; there's another way around it, as follows:

Code: Select all

{if $page_alias != reservation}
<div id="....
<p>Right column content</p>
</div>
{else}
<!-- Right column placeholder, there is nothing here now. -->
{/if}
Some explanation: the "if" statement checks if the page is different from the reservation page, and then renders the right column div, but if the page actually is reservation, the div is not rendered, and thus will not show up.

Re: Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 8:14 pm
by libralion
chris-s wrote: Just wanted to give a shout too; there's another way around it, as follows:

Code: Select all

{if $page_alias != reservation}
<div id="....
<p>Right column content</p>
</div>
{else}
<!-- Right column placeholder, there is nothing here now. -->
{/if}
Some explanation: the "if" statement checks if the page is different from the reservation page, and then renders the right column div, but if the page actually is reservation, the div is not rendered, and thus will not show up.
Ok that is an easy solution if it works. Where do I put that code? In the page, the stylesheet or the template?

Re: [Solved] Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 8:16 pm
by RonnyK
On editing a page, there is also the option to select another template, or the permissions arent set for the user you are logged in with.

@chris-s,

true, I knew that one as well, but that wouldnt give space to the main div, as the stylesheet still has some space reserved, even if it isnt shown on the page....

Ronny

Re: [Solved] Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 8:19 pm
by libralion
RonnyK wrote: On editing a page, there is also the option to select another template, or the permissions arent set for the user you are logged in with.

@chris-s,

true, I knew that one as well, but that wouldnt give space to the main div, as the stylesheet still has some space reserved, even if it isnt shown on the page....

Ronny
Hi Ronny,
Ok I finally found that feature on the editing page.
Too bad the option of Chris won't work. It was an easy solution.

Re: [Solved] Is it possible to remove rightcolumn for a certain page?

Posted: Tue Jul 22, 2008 8:20 pm
by christiaans
RonnyK wrote: On editing a page, there is also the option to select another template, or the permissions arent set for the user you are logged in with.

@chris-s,

true, I knew that one as well, but that wouldnt give space to the main div, as the stylesheet still has some space reserved, even if it isnt shown on the page....

Ronny
True about that. That is changed easily as well, as follows:

Code: Select all

{if $page_alias != reservation}
<div id="middle-column-normal">
<p>Middle column content</p>
</div>
{else}
<div id="middle-column-wide">
<p>Middle column content</p>
</div>
{/if}