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

sharingsunshine 08-28-2009 06:49 PM

Static Page Include Problem
 
Hello,

I have embedded static pages I want to include a .tpl file in. I am doing this thru the pages.tpl file. Here is my code in the pages.tpl file:

Code:

{* $Id: pages.tpl,v 1.3.2.1 2005/01/19 06:42:51 max Exp $ *}
{capture name=dialog}
{if $smarty.get.pageid eq "1" or $smarty.get.pageid eq "2" or $smarty.get.pageid eq "3" or $smarty.get.pageid eq "4" or $smarty.get.pageid eq "5" or $smarty.get.pageid eq "6" or $smarty.get.pageid eq "7" or $smarty.get.pageid eq "8" or $smarty.get.pageid eq "9" or $smarty.get.pageid eq "12"}
{include file="rjw/welcome_ship.tpl"}
{elseif $smarty.get.pageid eq "11"}
{include file="rjw/sitemap.tpl"}
{/if}
{if $page_content ne ''}
{if $config.General.parse_smarty_tags eq "Y"}
{eval var=$page_content}
{else}
{$page_content}
{if $smarty.get.pageid eq "1" or $smarty.get.pageid eq "2" or $smarty.get.pageid eq "3" or $smarty.get.pageid eq "4" or $smarty.get.pageid eq "5" or $smarty.get.pageid eq "6" or $smarty.get.pageid eq "7" or $smarty.get.pageid eq "8" or $smarty.get.pageid eq "9" or $smarty.get.pageid eq "12"}
{include file="rjw/welcome_ship.tpl"}{/if}
{/if}
{/if}
{/capture}
{include file="dialog.tpl" title=$page_data.title content=$smarty.capture.dialog extra="width=100%"}


This is the same arrangement I have used for another copy of x-cart I have that isn't as current. I have ticked in general setting "Parse Smarty tags in the content of embedded static pages: "

For some reason it isn't recognizing the .tpl file. I have looked in the source code of page in question and no navigation bar is being displayed.

Please let me know why this isn't working. The 4.0.19 is the one I am having trouble with.

Thanks,


Randal

JWait 09-07-2009 03:20 PM

Re: Static Page Include Problem
 
Is "rjw/welcome_ship.tpl" the .tpl it is not recognizing? Does it exist in the folder "skin1/rjw/" ?

sharingsunshine 09-08-2009 05:02 AM

Re: Static Page Include Problem
 
Yes, that is what X-Cart found out. I thought it was uploaded because I could see it. However, the code was not being brought in by the .tpl file. Instead, it was being brought in by a language variable but it was news to me.

I am embarrassed that it was so simple of a solution.

Instead of going through the pages.tpl interface, I was also needing to embed the smarty code into an individual static page. Do you know what syntax I would use for that?

Thanks,

Randal

ARW VISIONS 09-08-2009 05:14 AM

Re: Static Page Include Problem
 
Are there not individual pages in that version of x-cart?

sharingsunshine 09-08-2009 05:24 AM

Re: Static Page Include Problem
 
Yes, there are individual pages but at the time I needed to do it at the pages.tpl level because there were too many to address.

But as you can see from my last reply I now need to have the ability at the individual level and now I need to know that syntax.

Thanks,

Randal

ARW VISIONS 09-08-2009 05:46 AM

Re: Static Page Include Problem
 
Can't you just put your content directly in the static page.

I guess I don't understand what you are trying to do.

sharingsunshine 09-08-2009 06:34 AM

Re: Static Page Include Problem
 
Yes, I can put the content in the static page directly. However, it is content that needs to be in several static pages and it changes over time. It lists a shipping charge and that can change based on the manufacturers requirments.

Therefore, I was wanting to put in a .tpl file that I can change one time, if necessary, and it will be changed automatically through all of the static pages.

Hope that makes more sense.

Randal

cflsystems 09-08-2009 06:41 AM

Re: Static Page Include Problem
 
On static pages window make sure you tick "Parse Smarty tags in the content of embedded pages"


All times are GMT -8. The time now is 06:58 PM.

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