News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to create a 'page' in SMF?

Started by Rippler, December 18, 2009, 03:17:50 AM

Previous topic - Next topic

Rippler

What i need is an HTML page where I'll add my code. But I want to use the current SMF theme I am using. The page should feel like a part of the forum.

Thanks :)

JBlaze

If you use a .php document instead, you can call obExit() which will load the basic SMF template.

<?php
require_once('/your/path/to/ssi.php');

$context['page_title'] = 'Give your page a title here';
$context['linktree'][] = array(
    
'url' => 'url_to_page',
    
'name' => 'should be the same as page title',
);

obExit(true);

function 
template_main()
{
    echo 
'Your page stuff goes in here';
}

?>
Jason Clemons
Former Team Member 2009 - 2012

Rippler

Thanks a lot :)

Let me try this i am sure this will help.



Bigguy

That works great for making a page. The only thing I had to change was ssi.php to SSI.php  :)

sAce

this deserves to be sticky in tips and tricks section

JBlaze

There are many things you can do with this as well. It just takes a little creativity :P
Jason Clemons
Former Team Member 2009 - 2012

Advertisement: