Howto include linpha in your website

From LinphaWiki

Jump to: navigation, search

Howto include LinPHA in your website

Example file of your website:

File extensions must be .php (not .html)

<?php
	/**
	 * first linpha include, must be before any output startet
	 */
	define('LINPHA_DIR','./linpha');					// relative path to the linpha folder
	//define('LINPHA_LINK','/some/path/?cat=18');	// optional, link url for browsing
	include(LINPHA_DIR.'/index.php');
?>
<html>
<head>
<?php
	/**
	 * second linpha include, must be in the header part
	 * (css + javascript definitions)
	 */
	$GLOBALS['linpha']->template->includeFile('head');
?>
</head>
<body>
<?php
	/**
	 * optional linpha include for menu and title
	 */
	echo $linTpl->output['title'].'<br />';
	echo '<div id="menu">';
	$GLOBALS['linpha']->template->printMenus('search,more,icons');
	echo '</div>';
?>

<?php
	/**
	 * third linpha include, the main part
	 */
	$GLOBALS['linpha']->template->includeFile('body');
?>
</body>
</html>
Personal tools