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

How to include embedded page in .tpl file

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-22-2009, 06:48 AM
 
Oktane Design Oktane Design is offline
 

Member
  
Join Date: Apr 2008
Posts: 29
 

Default 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
__________________
X-Cart version 4.2
Reply With Quote
  #2  
Old 01-22-2009, 08:23 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default Re: How to include embedded page in .tpl file

When you create a embedded page you will get the .html link As Page filelike 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
Reply With Quote
  #3  
Old 01-22-2009, 08:38 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: How to include embedded page in .tpl file

you can also call the page like this

pages.php?pageid=8
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 01-22-2009, 08:44 AM
  Vetrivel's Avatar 
Vetrivel Vetrivel is offline
 

eXpert
  
Join Date: Apr 2008
Posts: 398
 

Default 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
Reply With Quote
  #5  
Old 01-22-2009, 08:53 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default 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.
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 01-22-2009, 10:38 AM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #7  
Old 01-22-2009, 05:48 PM
 
Oktane Design Oktane Design is offline
 

Member
  
Join Date: Apr 2008
Posts: 29
 

Default Re: How to include embedded page in .tpl file

Thanks a lot Vetrivel,

It works with :

{include file="pages/US/page_001.html" }
__________________
X-Cart version 4.2
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:04 AM.

   

 
X-Cart forums © 2001-2020