<?php echo \Modules\Factory::render($nav_item->{'details.module_position'}, \Base::instance()->get('PARAMS.0'));
/** * Renders a theme, template, and view, defaulting to the currently set theme if none is specified */ public function renderTheme($view, array $params = array(), $theme_name = null) { if (\Base::instance()->get('VERB') == 'HEAD') { return; } $params = $params + array('mime' => 'text/html', 'hive' => null, 'ttl' => 0); // Render the view. Happens before the Theme so that app view files can set values in \Base::instance that get used later by the Theme (e.g. the head) $view_string = $this->renderView($view, $params); // TODO Before loading the variant file, ensure it exists. If not, load index.php or throw a 500 error // Render the theme $theme = $this->loadFile($this->getThemePath($this->getCurrentTheme()) . $this->getCurrentVariant()); // render the system messages $messages = \Dsc\System::instance()->renderMessages(); $this->setBuffer($messages, 'system.messages'); // get the view and the theme tags $view_tags = $this->getTags($view_string); $theme_tags = $this->getTags($theme); $all_tags = array_merge($theme_tags, $view_tags); // Render any modules if (class_exists('\\Modules\\Factory')) { // Render the requested modules foreach ($all_tags as $full_string => $args) { if (in_array(strtolower($args['type']), array('modules')) && !empty($args['name'])) { // get the requested module position content $content = \Modules\Factory::render($args['name'], \Base::instance()->get('PARAMS.0')); $this->setBuffer($content, $args['type'], $args['name']); } } } // and replace the tags in the view with their appropriate buffers $view_string = $this->replaceTagsWithBuffers($view_string, $view_tags); $this->setBuffer($view_string, 'view'); // render the loaded views, if debug is enabled $loaded_views = null; if (\Dsc\System::instance()->app->get('DEBUG')) { $loaded_views = $this->renderLoadedViews(); } $this->setBuffer($loaded_views, 'system.loaded_views'); // Finally replace any of the tags in the theme with their appropriate buffers $string = $this->replaceTagsWithBuffers($theme, $theme_tags); return $string; }
</li> <li class="active">Invite Friends</li> </ol> <h3> Invite friends <a class="btn btn-link pull-right" href="./affiliate/dashboard"><i class="fa fa-chevron-left"></i> Back</a> </h3> <hr/> <tmpl type="modules" name="above-invite-friend" /> <?php $left = \Modules\Factory::render('left-invite-friend', \Base::instance()->get('PARAMS.0')); $right = \Modules\Factory::render('right-invite-friend', \Base::instance()->get('PARAMS.0')); $width = '12'; if ($left && $right) { $width = '4'; } elseif ($left && !$right || $right && !$left) { $width = '8'; } ?> <div class="row"> <?php if ($left) { ?> <div class="col-md-4"> <?php echo $left;