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)
-   -   How to include embedded page in .tpl file (https://forum.x-cart.com/showthread.php?t=45001)

Oktane Design 01-22-2009 06:48 AM

How to include embedded page in .tpl file
 
Hello Guys,

I would like to include the content of an embedded page into a .tpl file

In customer/main/subcategories.tpl i have added this code a the top of the page :

Code:

{if $cat eq 244}
{include file="" }

{else}


If the cateogry is 244 i would like to call the content of an embedded page instead of the subcategories list.

Do you have any idea how i could do this?

Thanks a lot

Vetrivel 01-22-2009 08:23 AM

Re: How to include embedded page in .tpl file
 
When you create a embedded page you will get the .html link As Page file:(like this: C:\wamp\www\xcart/skin1\pages\US\page_001.html)

So,
Try to use like this.I hope this will work.
{if $cat eq 244}
{include file="pages/US/page_001.html" }




Quote:

Originally Posted by Oktane Design
Hello Guys,

I would like to include the content of an embedded page into a .tpl file

In customer/main/subcategories.tpl i have added this code a the top of the page :

Code:

{if $cat eq 244}
{include file="" }

{else}


If the cateogry is 244 i would like to call the content of an embedded page instead of the subcategories list.

Do you have any idea how i could do this?

Thanks a lot


ARW VISIONS 01-22-2009 08:38 AM

Re: How to include embedded page in .tpl file
 
you can also call the page like this

pages.php?pageid=8

Vetrivel 01-22-2009 08:44 AM

Re: How to include embedded page in .tpl file
 
Hi Ashley,

Do you think it is possible?
Because I have tried it but it just return the error,
Warning: Smarty error: unable to read resource:

Quote:

Originally Posted by Ashley
you can also call the page like this

pages.php?pageid=8


ARW VISIONS 01-22-2009 08:53 AM

Re: How to include embedded page in .tpl file
 
I don't think you can actually call the embeded page.

I think you would ahve to make a custom .tpl file, maybe pageInfo.tpl and place the embeded page info int the .tpl. then call the .tpl file instead of the subcat list.

gb2world 01-22-2009 10:38 AM

Re: How to include embedded page in .tpl file
 
You can try post 11 in this thread. Post 10 is the way to do it, but requires a little more work.

Oktane Design 01-22-2009 05:48 PM

Re: How to include embedded page in .tpl file
 
Thanks a lot Vetrivel,

It works with :

{include file="pages/US/page_001.html" }


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

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