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

How do you add a page to the template?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-27-2005, 08:44 AM
 
mikefeiman mikefeiman is offline
 

Member
  
Join Date: Jan 2005
Posts: 23
 

Default How do you add a page to the template?

I'm trying to create a page that wraps the current template of the site around some basic html. I created a php page and a tpl page but I keep getting the following error. I placed the tpl file in \shop\skin1\customer\main and the php page is placed in \shop\customer

"Pool Dawg :: Access denied !

Page not found!
The requested page is not exists or you are not allowed to access that resource! "

Page Link

PHP code: dogsecure.php
Code:
<?php # # $Id: search.php,v 1.50.2.6 2004/02/05 12:25:45 mclap Exp $ # require "./auth.php"; require $xcart_dir."/include/categories.php"; if($active_modules["Bestsellers"]) include $xcart_dir."/modules/Bestsellers/bestsellers.php"; $smarty->assign("main","dogsecure"); $smarty->display("customer/home.tpl"); ?>


TPL code: dogsecure.tpl
Code:
<font class=NavigationPath>{$config.Company.company_name}</font><font class=NavigationPath>::Secure Site</font> <TABLE border=0 cellPadting=0 cellSpacing=0 width="100%" {$extra}> <TR> <TD height=15 class=DialogTitle background="{$ImagesDir}/dialog_bg_n.gif" valign=bottom>Secure Site</TD> </TR> <TR><TD class=DialogBorder><TABLE border=0 cellPadting=10 cellSpacing=1 width="100%"> <TR><TD class=DialogBox> <table width="100%" border="0" cellspacing="3" cellpadding="0"> <tr height="19"> <td align="left" valign="top" width="130" height="19"> <script src="https://siteseal.thawte.com/cgi/server/thawte_seal_generator.exe"></script> </td> <td align="left" valign="top" height="19"> txt </p></td> </tr> </table> </TD></TR> </TABLE></TD></TR> </TABLE>
__________________
Billiard Exchange
Version 3.5.4
Reply With Quote
  #2  
Old 01-27-2005, 12:01 PM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

also see home_main.tpl
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #3  
Old 01-27-2005, 12:35 PM
 
mikefeiman mikefeiman is offline
 

Member
  
Join Date: Jan 2005
Posts: 23
 

Default

Thanks that worked out well.
__________________
Billiard Exchange
Version 3.5.4
Reply With Quote
  #4  
Old 01-31-2005, 11:17 AM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Hello,

I'm trying to do the same thing but can't get it to work.

I copyied this example exactly but I get the .tpl contents displaying above the main home.tpl template instead of within it where it should be.

Thanks in advance for any help you can give.

Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #5  
Old 01-31-2005, 11:31 AM
 
mikefeiman mikefeiman is offline
 

Member
  
Join Date: Jan 2005
Posts: 23
 

Default

lets see your code
__________________
Billiard Exchange
Version 3.5.4
Reply With Quote
  #6  
Old 01-31-2005, 12:04 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Hello,

I originally had two "display" commands in the .php file but I changed one as per your example above.

Here is the ourstory.php which is in my root directory because that's where I installed X-Cart:

Code:
<?php # # $Id: search.php,v 1.50.2.6 2004/02/05 12:25:45 mclap Exp $ # require "./auth.php"; require $xcart_dir."/include/categories.php"; $smarty->assign("main", "ourstory.tpl"); $smarty->display("customer/home.tpl"); ?>



And ourstory.tpl which I saved in customer/main:

Code:
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%"> <TR> </TR> <TR><TD><TABLE border=0 cellPadting=10 cellSpacing=1 width="100%"> <TR><TD> <table width="100%" border="0" cellspacing="3" cellpadding="0"> <tr height="19"> <td align="left" valign="top" width="130" height="19"> This is a test to see if it's working!!! </td> </tr> </table> </TD></TR> </TABLE></TD></TR> </TABLE>


Thanks for your help,
Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #7  
Old 01-31-2005, 12:17 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

Something else I wanted to ask about is whether it's possible to embed the page information in such a way that Search Engines can see the content. The fact that this doesn't happen with .php pages is a problem.

However I can't use static pages because I want to use my site template.

Any ideas?

Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #8  
Old 01-31-2005, 12:52 PM
 
mikefeiman mikefeiman is offline
 

Member
  
Join Date: Jan 2005
Posts: 23
 

Default

Hi, try just putting some text in your tpl file.

Code:
This is a test

As far as your site being crawled by search engines you should run the html catalog function in the back end. This will create your site in static html pages. Then create a sitemap that links to all of those pages. This will help search engines to crawl your site.
__________________
Billiard Exchange
Version 3.5.4
Reply With Quote
  #9  
Old 01-31-2005, 01:06 PM
 
jkirkpatrick jkirkpatrick is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 193
 

Default

I'll try that, thanks.

As for generating an HTML catalogue, I did that, however that doesn't include HTML versions of the pages such as the Help pages and the ones I'm creating now.

That means there are at least 10 pages of good content that use my keywords yet can't be indexed properly because they're PHP.

Unless you know a way to generate them in HTML?


Jennifer
__________________
Jennifer Kirkpatrick
X-Cart Pro Version 4.4.1
AND
X-Cart Gold Version 4.1.9
Reply With Quote
  #10  
Old 01-31-2005, 01:22 PM
 
mikefeiman mikefeiman is offline
 

Member
  
Join Date: Jan 2005
Posts: 23
 

Default

If it's only 10 pages you could always copy the html that the php generates in internet explorer and copy that into a new file and save it as an html page. Then just do a massive find and replace to rename the extension.
__________________
Billiard Exchange
Version 3.5.4
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:09 PM.

   

 
X-Cart forums © 2001-2020