summaryrefslogtreecommitdiff
path: root/smartyplugins/function.nexus.php
diff options
context:
space:
mode:
Diffstat (limited to 'smartyplugins/function.nexus.php')
-rw-r--r--smartyplugins/function.nexus.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/smartyplugins/function.nexus.php b/smartyplugins/function.nexus.php
new file mode 100644
index 0000000..9c54c32
--- /dev/null
+++ b/smartyplugins/function.nexus.php
@@ -0,0 +1,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');
+}
+?> \ No newline at end of file