Sunday, December 5, 2010

Create a static page in ilance project

write a example.php in your root folder

<?php

define('LOCATION','example');

define('LOCATION_NAV','example');

require_once('./functions/config.php');

$navcrumb = array("$ilpage[example]" => $ilcrumbs["$ilpage[example]"]);

$area_title = 'Area title';

$page_title = SITE_NAME.' - Page title';

$ilance->template->fetch('main', 'example.html'); //$ilance->template->fetch(‘main’, ‘example.html’);

$ilance->template->parse_hash('main', array('ilpage' => $ilpage));

$ilance->template->parse_if_blocks('main');

$ilance->template->pprint('main', array('login_include','headinclude','area_title','page_title','site_name','https_server', 'http_server','lanceads_header','lanceads_footer'));

exit();


?>



now create a example.html file under templates\default\

<table width='100%' border='0? cellpadding='2? cellspacing='0? align='center'>

<tr>

<td><strong>{_where_to}</strong></td>

<tr>

<td><table width='100%' border='0? cellspacing='1? cellpadding='2?>

<tr>

<td width='9%' align='center'><img src='{template_relativeimagepath}{template_imagesfolder}arrow_right.gif' width='18? height='18? /></td>

<td width='91%'><a href='{ilpage[main]}'>{_main_menu}</a></td>

</tr>

</table></td>

</table>



no go to the functions\api\class.ilance.inc.php

find
$ilpage = array(
add
'example' => 'example' . $ilconfig['globalsecurity_extensionmime'],

now you can get this page http://your site/main-example

1 comment:

  1. it may be
    now you can get this page http://your site/example.php

    ReplyDelete