Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Embedded Static Page Problem

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-10-2007, 09:00 AM
  DrQuietus's Avatar 
DrQuietus DrQuietus is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 81
 

Default 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?
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote
  #2  
Old 10-10-2007, 10:07 AM
  DrQuietus's Avatar 
DrQuietus DrQuietus is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 81
 

Default 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.
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote
  #3  
Old 10-10-2007, 10:27 AM
  DrQuietus's Avatar 
DrQuietus DrQuietus is offline
 

Advanced Member
  
Join Date: Dec 2005
Posts: 81
 

Default 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.
__________________
Dave Jones
dave@industrialwebworks.net
Mostly 4.7.2 - 4.7.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:03 AM.

   

 
X-Cart forums © 2001-2020