Jump to content

Using conditional statements to hide parts in tpl


Recommended Posts

I'm trying to hide a block of html from the checkout page (cart page with opc enabled), actually remove it. I have understand;

{if $page_name == 'index'}

{else}

{/if}

 

But if I replace index with cart, checkout or order, it doesn't function. What would go there for the checkout page?

 

* Update: order-opc as pagename worked, say if I want to do same for account page etc, how would that work? Tried && $page_name != 'identity' but didn't work

Edited by projects (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Thanks for the above :)

 

A follow up question on this;

Is it possible to display content in a themes tpl based on product id?

 

So if I add product id 5 to cart, on checkout page tpl I could show a div with information. If I add 5 plus prod id 6, it would still show, but if it's prod id 6 only then it wouldn't be there.

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...