How to create custom page as main page?

sundri

No avatar

2007-04-03 15:20

anyone know how to do this?

i want to add a custom page (main_page.tpl) which will act as the main page for the website..
jus like the contact.tpl, but I do know how to make it the starting page..

I want to place some flash moive on this page, and don't want to change to an html editor...

This is very important for me..

» Quick.Cart v1.x

treewood (OpenSolution)

Avatar: treewood

2007-04-04 09:16

sundri - ok maybe it will work:
1. edit index.php and change this

if( !isset( $p ) || $p == '' ){
  
$p  $config['start_page'];
}

to

if( !isset( $p ) || $p == '' ){
  
$p  'main';
}


2. in index.php change

if( is_file$sActionFile ) )
  require_once 
$sActionFile;

to

if( is_file$sActionFile ) )
  require_once 
$sActionFile;
elseif( 
$p == 'main' ){
  
$content .= $tpl->tHtml'main_page.tpl' );
}

3. Create file templates/main_page.tpl and display as main page what You want.

All links which must redirect to home page change to http://YourSite.com/?p=main

Works?

sundri

No avatar

2007-04-04 19:37

yup, it works like magic...

thanks alot.. but i need to ask.. 1 more question, what if i want to add an another page jus to add on the menu, but not as the starting page..

for example:

On the menu, i add "Watch flash video", then make a "flash_gallary.tpl"..?

treewood (OpenSolution)

Avatar: treewood

2007-04-05 08:20

sundri -
1. create link <a href="?p=flash">Watch flash video</a>
2. Add this:

elseif( $p == 'flash' ){
  
$content .= $tpl->tHtml'flash_gallery.tpl' );
}

sundri

No avatar

2007-04-05 20:53

thank you for the help treewood..

Back to top
about us | contact