/** * Render script information * * @param string The script information * @param array Associative array of attributes * @return string */ protected function _renderScript($link, $attribs = array()) { if (KRequest::type() == 'AJAX') { return parent::_renderLink($script, $attribs); } $relType = 'rel'; $relValue = $attribs['rel']; unset($attribs['rel']); JFactory::getDocument()->addHeadLink($link, $relValue, $relType, $attribs); }
/** * Render the tag * * @param array $attribs Associative array of attributes * @param string $content The tag content * @return string */ protected function _renderTag($attribs = array(), $content = null) { if ($this->getTemplate()->getParameters()->layout !== 'koowa') { $link = isset($attribs['href']) ? $attribs['href'] : false; $relType = 'rel'; $relValue = $attribs['rel']; unset($attribs['rel']); unset($attribs['href']); JFactory::getDocument()->addHeadLink($link, $relValue, $relType, $attribs); } else { return parent::_renderTag($attribs, $content); } }