From f0f0c824227d9b7b5e7a1464eb351f9242b78d32 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Mon, 17 Jun 2019 13:46:19 -0400 Subject: [PATCH] Call standard template params in each plugin So each plugin can have standard params in smarty. --- controllers/admin.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/controllers/admin.php b/controllers/admin.php index cbbfe929..3be5f690 100755 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -385,6 +385,14 @@ class glmMembersAdmin extends GlmPluginSupport // Add standard template parameters require GLM_MEMBERS_PLUGIN_SETUP_PATH . '/standardTemplateParams.php'; + // Add standard template parameters for plugins + foreach ( $this->config['addOns'] as $a ) { + $stdTempFile = $a['dir'].'/setup/standardTemplateParams.php'; + if ( is_file( $stdTempFile ) ) { + require_once $stdTempFile; + } + } + // Add data from model to Smarty template if ( is_array( $results['data'] ) && count( $results['data'] ) > 0 ) { foreach ( $results['data'] as $k=>$d ) { @@ -1080,6 +1088,13 @@ class glmMembersAdmin extends GlmPluginSupport // Add standard template parameters require GLM_MEMBERS_PLUGIN_SETUP_PATH . '/standardTemplateParams.php'; + // Add standard template parameters for plugins + foreach ( $this->config['addOns'] as $a ) { + $stdTempFile = $a['dir'].'/setup/standardTemplateParams.php'; + if ( is_file( $stdTempFile ) ) { + require_once $stdTempFile; + } + } // Add data from model to Smarty template if ( is_array( $results['data'] ) && count( $results['data'] ) > 0 ) { foreach ( $results['data'] as $k=>$d ) { -- 2.17.1