1
voltan
Question about module header
  • 2011/1/15 19:05

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


Hi all

I look to many xoops modules and I see template_main add like this :

$xoopsOption['template_main'] = '******_index.html';
...
include_once 
XOOPS_ROOT_PATH.'/header.php';


first add $xoopsOption['template_main'] in next line('s) xoops header.php added .

if I change the code like this :

include_once XOOPS_ROOT_PATH.'/header.php';
....
$xoopsOption['template_main'] = '******_index.html';


it have problem? I test it and I don't have any problems yet

2
phppp
Re: Question about module header
  • 2011/1/16 3:53

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


It will cause problems if cache is enabled.
Cached is checked in Xoops header.php partially depending on $xoopsOption['template_main'].
Thus if $xoopsOption['template_main'] is assigned after header.php, cache will not be checked correctly.

Cache mechanism is changed in X3 though.

3
voltan
Re: Question about module header
  • 2011/1/16 5:24

  • voltan

  • Theme Designer

  • Posts: 724

  • Since: 2006/12/5


Thank you very much . I noticed

Login

Who's Online

235 user(s) are online (148 user(s) are browsing Support Forums)


Members: 0


Guests: 235


more...

Donat-O-Meter

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

Latest GitHub Commits