blob: 9c54c32b1c7dcf6057b0470e7bf37f019901b18f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* Smarty {nexus} function plugin
*
* Type: function
* Name: nexus
* Input: - id (required) - id of the menu that should be displayed
*/
function smarty_function_nexus( $params, &$gBitSmarty ) {
extract($params);
if( empty( $id ) ) {
$gBitSmarty->trigger_error("assign: missing id");
return;
}
require_once( NEXUS_PKG_PATH.'Nexus.php' );
$tmpNexus = new Nexus( $id );
$nexusMenu = $tmpNexus->mInfo;
$gBitSmarty->assign( 'nexusMenu', $nexusMenu );
$gBitSmarty->assign( 'nexusId', $id );
$gBitSmarty->display('bitpackage:nexus/nexus_module.tpl');
}
?>
|