This topic is locked

change display location

4/26/2007 6:45:47 AM
PHPRunner General questions
P
ploppy author

hi. i am sure this is possible, but i am having trouble seeing the logic. in a test database i created, the test_list.php display location i listed as:

$smarty->display("test_list.htm");


i need to change this to point to a smatry command like this:

func_display("customer/page.tpl",$smarty);


The problem is that when i do this, it errors like this:

Fatal error: Call to undefined function: func_display() in /home/site/public_html/folder/search/test_list.php on line 547


line 547 is this:

func_display("customer/page.tpl",$smarty);


is it possible to change the display location to a smarty template rather than test_list.htm or incorparate it somehow? Many thanks for help.
ver 3.11

Alexey admin 4/26/2007

Hi,
try to rephrase your question so I'll be able to understand you.

Screenshot or two will help.

P
ploppy author 4/26/2007

hi alexey. ok, at the moment if you create a databse it gives a call to _list.htm as output.

$smarty->display("test_list.htm");


test is just the name i have used for example. it seems all output is to a htm file no matter what database you make. my question was, instead of outputting to _list.htm can output be directed to a smarty template tpl file? if i want to include the php in my pages, i would normally use:

{php}

require "/home/site/public_html/search/test_list.php";

{/php}

or

{include_php file="/home/site/public_html/search/test_list.php"}


to call the php, but if i do that it errors. if i however, just link to the test_list.php and open in new window it opens fine. clearer? Thx

Alexey admin 4/27/2007

I suppose your goal is to integrate generated List page into your existing page.
Unfortunately there is no reliable way that will work in all cases.

Theoretically using require will work however you need to resolve all the errors manually.

Maybe if you show me the errors you get I can point you into right direction.
The recommended way to integrate PHPRunner-created pages is to modify your pages in Visual Editor or use Header and Footer

to make them look like the rest of your site.
Here is the artice about header and footer.

http://www.xlinesoft.com/phprunner/articles/supertop.htm

P
ploppy author 4/27/2007

Thx alexey. i t seems to me as though the smarty is causing the problems somehow. using header & footer php is going to be difficult because the whole site is based on smarty tpl files so i shall have to incorporate these somehow into these extra php files. i am very grateful for your assistance and feel sure i shall beat this problem :-) many thx.