PDA

View Full Version : How do I create a new page in SAA?



Citizen
01-07-2010, 05:55 PM
In your main SAA folder, create a file called sample_page.php

Inside this file, paste the following code:


<?php
require_once('./include/setup/setup.php');
include('header.php');

$smarty->assign('sampleVar','hello');

include('footer.php');
$smarty->display('sample_page.tpl');
?>Then, create a new file in your /templates folder, called sample_page.tpl

Inside this file, paste the following code:


{include file='./header.tpl'}
{$sampleVar|capitalize} world!
{include file='./footer.tpl'}Then, point your browser to yourdomain.com/sample_page.php and see the results!

tugatech.com.pt
11-12-2011, 06:55 PM
Hello,

I do this, but appears a white page...

What can i do?

Citizen
11-14-2011, 03:53 PM
Enable debug mode, what error do you get?

tugatech.com.pt
11-14-2011, 04:02 PM
i have notice that i have to change this:

$smarty->display('sample_page.tpl');

by this


$smarty->display($Page->_sLocation);

now it's working...
Thanks

Citizen
11-14-2011, 04:04 PM
What was your tpl file name? Both should work.

tugatech.com.pt
11-14-2011, 04:09 PM
i have tryed with the same tpl name that in the first message...
but didn't work...
:)

Citizen
11-16-2011, 04:32 PM
Yea, we'll have a new guide for v2 new pages :)