Jump to content

remove header and footer from specific pages


Recommended Posts

Hey willcm,

Which version are you using?

You should be able to do it by placing a conditional "if" statement around the divs you want to hide, and then add something like this:

{if $page_name != 'authentication'}<div to be hidden.....</div>{/if}

 

This means the div will only be shown on pages that are not "authentication"

 

Cheers

Link to comment
Share on other sites

Thanks Nemo, so if I want to remove the right column on product-list.tpl it's like this in footer.tpl?

 

 

 

{if $page_name != 'product-list'} <!-- Right --><div id="right_column" class="column grid_2 omega">{$HOOK_RIGHT_COLUMN}</div>{/if}

 

Link to comment
Share on other sites

Hi Nemo - Is there somewhere that lists all the page names? I just tried to dump the variables to get the name of the product page with this code and it gave an error:

 

{php}
 $myvar = $this->get_template_vars('var'); var_dump($myvar);
{/php}

 

Or do you know the name of the product page?

Link to comment
Share on other sites

  • 3 years later...

It is depending from your template. Default one have  this in code if you check source 

<body id="cms" class="cms cms-4 cms-about-us">

so small modification of Nemo's code

.csm-4 #header {display:none}

or 


.csm-about-us #header {display:none}

If you have multiple languages first one is safer I think.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 11 months later...

 found a way to exactly display a page without header and footer, perfect to put it in a popup like fancybox. you must add a get variable to the URL to display only the content.

content_only=1

so for this case of displaying the cart page only, here is the URL

index.php?controller=order&content_only=1

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...