1
McNaz
Xoops 2.0.13.1 and Template Manager
  • 2005/8/26 8:17

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Hi all.

I’ve noticed something very peculiar. When editing a template file with the “Update module template .html” option set to Yes in System -> Preferences, Smarty recompiles the template file on any change. As soon as I change my theme from the supplied default theme the update no longer works.

The theme I am changing to is a copy of the default theme with only the logo changed, so nothing drastic there.

It seems that Smarty is only taking the “Update module template .html” into account when XOOPS is set to the default theme. Is this by design or am I missing something? I’m currently debugging through the Smarty code but have only managed to scratch the surface.

Templates can still be recompiled via System -> Modules -> Update but this is a slight pain during template development.

Any help would be greatly appreciated.


Cheers.

2
hyperpod
Re: Xoops 2.0.13.1 and Template Manager
  • 2005/8/26 9:14

  • hyperpod

  • Quite a regular

  • Posts: 359

  • Since: 2004/10/4


Well, theres a few things goinf on here.

The admin | preferences setting for “Update module template .html” only applies to the main XOOPS theme in use.

If you want to edit the module templates,
You still have to do the System -> Modules -> Update to update the modules template changes.


Thats how it works, and its rather intuitive to me. But I can see the possible confusion.


After a while, it will be easier to understand why i think.


Hope that helps,
Daniel Hall / XOOPS Module Development & Theme Design
Free XOOPS Support > My Wish List

3
Mithrandir
Re: Xoops 2.0.13.1 and Template Manager

Quote:
It seems that Smarty is only taking the “Update module template .html” into account when XOOPS is set to the default theme. Is this by design or am I missing something? I’m currently debugging through the Smarty code but have only managed to scratch the surface.

It is by design, since other themes than the default can override templates by placing templates in themes/yourtheme/templates/modulename/ folder.

A side-effect of this setting is that the theme.html is recompiled, but the main objective of this setting is that themes can override module templates like I just outlined.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

4
McNaz
Re: Xoops 2.0.13.1 and Template Manager
  • 2005/8/26 11:09

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


@Mith: Thanks for that. I'll stick to the default theme while developing templates.

@hyperpod:

Thanks for the answer.

Quote:
The admin | preferences setting for “Update module template .html” only applies to the main XOOPS theme in use.


I can confirm that with this setting on, not only does the theme.html file get recompiled if modified, but also any module template files as well (when modified)... but only if the default theme is selected.

I am finding this rather handy as I am developing my templates in a module because the change comes through immediately and without the need of a System -> Modules -< Update Module.

Thanks for the answers.

Cheers.

Login

Who's Online

395 user(s) are online (266 user(s) are browsing Support Forums)


Members: 0


Guests: 395


more...

Donat-O-Meter

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

Latest GitHub Commits