1
frankblack
$xoTheme vs. $xoopsTpl
  • 2009/8/20 15:45

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


Is there any reason why I should NOT use $xoTheme->addScript() or $xoTheme->addStylesheet in comparison to $xoopsTpl->assign('xoops_module_header', 'xx') for the XOOPS version 2.3 and higher?

Or is the use of $xoTheme depending on "modern" themes, I mean also the backend themes? Or is xoops_module_header deprecated?

Silly question? My speciality! <- should be my new signature.

2
trabis
Re: $xoTheme vs. $xoopsTpl
  • 2009/8/20 16:06

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


$this->template->assign'xoops_module_header'$this->renderMetasnulltrue ) . "n" $header );


$xoTheme->addScript(), are just shortcuts. They are rendered and appended to xoops_module_header. You should use this method inside blocks because modules, some of them, overwrite xoops_module_header.

This problem was not addressed but it is 'documented' in code:
// We assume no overlap between $xoopsOption['xoops_module_header'] and $this->template->get_template_vars( 'xoops_module_header' ) ?
        
$header = empty($xoopsOption['xoops_module_header']) ? $this->template->get_template_vars'xoops_module_header' ) : $xoopsOption['xoops_module_header'];

Login

Who's Online

355 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 355


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits