X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Where is $page_container_class set? (https://forum.x-cart.com/showthread.php?t=59527)

believein 05-26-2011 08:28 AM

Where is $page_container_class set?
 
Hi,

I can see in home.tpl that there is a $page_container_class which 'might' allow me to implement different styles on different pages.

Code:

<<div id="page-container"{if $page_container_class} class="{$page_container_class}"{/if}>

Where is this set though? Can I set it in the admin area somewhere?

I'd like to set a class for all the static pages to hide all the shopping related stuff when on them. Can do this?

JWait 05-26-2011 08:39 AM

Re: Where is $page_container_class set?
 
It is in either altskin.css or main.css, depending on the template used.
skin/common_files/css/main.css
skin/your-template-name/css/altskin.css.

X-cart "looks" in altskin.css first, and if it isn't there "looks" in main.css. Actually, it loads them backwards from this, but that is the easiest way to describe it.

believein 05-26-2011 09:09 AM

Re: Where is $page_container_class set?
 
Thanks JWait but I think you miss understand me. Probably my fault.

Basically, I only want my shpping cart to appear on the 'shop' pages. I wanted to hide it on the 'static' pages.

I thought there would be a setting in the admin section which allow my to give the page a css class (in the body tag or something). But if there is I couldn't find it.

I have found a work around though ... adding this to home.tpl

Code:

<div id="page-container" class="{$main}">

This gives me the hook I need to call from the css file to style / hide anything on these pages differently. Sorted.

balinor 05-26-2011 09:25 AM

Re: Where is $page_container_class set?
 
You can also use {if} statements to show/hide content:

{if $main ne "pages"}show cart{/if}

believein 05-26-2011 09:35 AM

Re: Where is $page_container_class set?
 
Ah fantastic! thank you.


All times are GMT -8. The time now is 03:04 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.