Create a php page
I have searched and tried for hours in a row but don't manage to create a php page which displays a certain lbl from the database. In static pages this works but I don't get it to work with a php page ...
Can somebody help me out with this? |
Re: Create a php page
Did you associate a .tpl file with the php file?
|
Re: Create a php page
I did the following; I created a .php file and a .tpl file as follows:
Php file (called new_page.php situated in shop directory): Code:
<?php Tpl file (called new_page.tpl situated in skin1/customer/): Code:
{$lng.lbl_new_page} In the language section of the database I've created 'lbl_new_page' Opening new_page.php results in: 'Page not found! The requested page does not exist or you are not allowed to access it! ' |
Re: Create a php page
Did you add the if statement to customer/home_main.tpl?
|
Re: Create a php page
Yes, sorry forgot to mention, I added
Code:
{* New page *} under Code:
{elseif $smarty.get.mode eq "unsubscribed"} |
Re: Create a php page
Should be...
Code:
|
Re: Create a php page
Thanks PhilJ,
I do get something else now: Code:
Warning: Smarty error: unable to read resource: "new_page.tpl" in /home/my_name/public_html/shop/Smarty-2.6.12/Smarty.class.php on line 1095 |
Re: Create a php page
Ensure the new_page.tpl is in your /skin1 directory.
|
Re: Create a php page
I got it working now, the new_page.tpl was in skin1/customer; I have placed it in skin1 and now it works :) Thanks for the help!
|
Re: Create a php page
do you get doubles warwick ? i tried that and i got doubles of everything. all i basically need to do is to display the best sellers on the left side of my site's main page ?
|
All times are GMT -8. The time now is 09:42 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.