Jaxel
Well-known member
As you know... I have XenPorta... The way it works, is that it collects the module information, and then builds the modules into HTML so that it can be embedded in the portal page...
The issue, is that since these createTemplateObject call are embedded into an existing $view, they don't have a $view of their own. While in most cases, this is perfectly fine, it creates issues with my Recent News Module Block and custom BBcode that require templates. For instance, using the QUOTE tag... it uses a !$view fallback, which doesn't look anywhere near as good as the $view version.
How would I get it so that these advanced BBcodes that require templates are processed in full, instead of the fallback?
Code:
<?php
class EWRporta_ViewPublic_Portal extends XenForo_ViewPublic_Base
{
public function renderHtml()
{
$blocks = array('top' => array(), 'bottom' => array(), 'left' => array(), 'center' => array(), 'right' => array());
foreach ($this->_params['modules'] AS $module)
{
switch ($module['module_position'])
{
case "top": $blocks['top'][] = $this->createTemplateObject($module['template'], $module['params']); break;
case "bottom": $blocks['bottom'][] = $this->createTemplateObject($module['template'], $module['params']); break;
case "left": $blocks['left'][] = $this->createTemplateObject($module['template'], $module['params']); break;
case "center": $blocks['center'][] = $this->createTemplateObject($module['template'], $module['params']); break;
case "right": $blocks['right'][] = $this->createTemplateObject($module['template'], $module['params']); break;
}
}
$this->_params['blocks'] = $blocks;
}
}
The issue, is that since these createTemplateObject call are embedded into an existing $view, they don't have a $view of their own. While in most cases, this is perfectly fine, it creates issues with my Recent News Module Block and custom BBcode that require templates. For instance, using the QUOTE tag... it uses a !$view fallback, which doesn't look anywhere near as good as the $view version.
How would I get it so that these advanced BBcodes that require templates are processed in full, instead of the fallback?