Hello all, my first time using xcart so please go easy, I used to work with Actinic ecommerce software but got sick and tired of it.
Getting used to the structure and how the store works. Im throwing myself in at the deep end and creating a fresh template.
One of the things I want to do is hide or show various elements depending on what page the user is on.
Im aware that this can be done and have achieved it on some items, but for this one im stuck >>
In content.tpl I have created a space which will hold a rotating / fading jquery slider, this needs to appear as default apart from various pages, these being:
cart stuff
product pages
category pages
On the category pages only, I want to replace this div with another which holds the current category image. I have found out how to do this:
http://forum.x-cart.com/showthread.php?t=54046
Being a designer and not being a programmer (having a head that works that way) im guessing at what I need.
So far I have got the following which show the category images:
<div id="banner">
<img src="{if $current_category.icon_url}{$current_category.icon _url}
{else}{$xcart_web_dir}/image.php?id={$cat}&type=C{/if}" alt="Home & Garden" />
</div><!-- / banner -->
How do I hide this on every other page, but show the other div as default apart from the cart stuff and product pages?
I have got this far for the hiding on the product and cart page. Ive tried to find something which would allow hiding on the categories but haven't been able to.
{if ($main neq 'product' and $main neq 'cart' or $cart_empty) and $main neq 'checkout'}
<div id="banner">
jquery slider
</div><!-- / banner -->
{/if}
If's and else's direction needed please.
Thanks in advance.
Kon