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)
-   -   Embedded Static Page Problem (https://forum.x-cart.com/showthread.php?t=34499)

DrQuietus 10-10-2007 09:00 AM

Embedded Static Page Problem
 
I have laid out a three column site that is parked here: http://probotest3.com The middle column is obviously where the content is getting called. On the home page I have a flash that is the width of the second and third column so I used this code:

{if $main eq "catalog" and $current_category.category eq "" }

{include file="customer/main/welcome.tpl" f_products=$f_products}

{/if}

{if $main ne "catalog" OR ($main eq "catalog" and $current_category.category ne "")}
<div id="middlecolumn">

This is excluding the middlecolumn and the rightcolumn from the home page and is working great. However I now have a static page 'pages.php?pageid=24' that also needs to be the width of the home page. It is a flash map that has the contact info for people in different areas of USA, but when I make it small enough to fit in the middlecolumn it is unreadable.

I thought I could add to the above statements and include the welcome.tpl on this static page, then put the {if $main eq "catalog" and $current_category.category eq "" } on the welcome.tpl so it displays the correct flash when you are on the home page or the static page.

what would the code be if I want to say {if $main eq "pages.php?pageid=24"} ? What do I need to replace "pages.php?pageid=24" with to make it work?

DrQuietus 10-10-2007 10:07 AM

Re: Embedded Static Page Problem
 
OK I found what I was looking and changed the code to the following:

{if $main eq "catalog" and $current_category.category eq "" OR $smarty.get.pageid eq "24"}

{include file="customer/main/welcome.tpl" f_products=$f_products}

{/if}

{if $main ne "catalog" OR ($main eq "catalog" and $current_category.category ne "") and $smarty.get.pageid ne "24"}
<div id="middlecolumn">

But the middle and left columns are still displaying under the flash on the satic page, how can I fix it? I am on a tight deadline, someone please help. Thanks.

DrQuietus 10-10-2007 10:27 AM

Re: Embedded Static Page Problem
 
I was making things too compicated. The first if statement was working so I just cut out the whole second if statement with an {else}. This is how it worked in case, for some off the wall reason, someone else wants to do this:

{if $main eq "catalog" and $current_category.category eq "" OR $smarty.get.pageid eq "24"}
{include file="customer/main/welcome.tpl" f_products=$f_products}


{else}
<div id="middlecolumn">


I really need to spend some time learing smarty and php better. Can anyone recommend a good place to start? I live in Bulgaria, so books in english are hard to find and cost more to ship than to purchase.


All times are GMT -8. The time now is 09:33 AM.

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