1
SERB-4-LIFE
Each theme to have different template sets

Hello,

I was just thinking and I looked around on the forum but couldn't find anything about this.

Is it actually possible to have a template set for each theme?

If it is possible how do I do that?

Thanks

2
snow77
Re: Each theme to have different template sets
  • 2006/11/27 0:03

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


It can be possible through the tempate overriding feauture starting from XOOPS V2.0.14

Release Notes of XOOPS 2.0.14:

Templates overriding

Designers can add custom templates to their themes
, and those will be used instead of the default onesTo exploit this featuretemplates have to be created in subfolders of the themes duplicating the default folders structure and removing the "templates" part:

    * 
To overload system_userinfo.html template located in modules/system/templates/system_userinfo.html you have to create your custom version in <yourthemefolder>/modules/system/system_userinfo.html
    
To overload system_block_login.html template located in modules/system/templates/blocks/system_block_login.html you have to create your custom version in <yourthemefolder>/modules/system/blocks/system_block_login.html

Output resources overriding 
for developers

To allow theme designers to customize images 
or stylesheetsyou have to use the new theme class and xoImgUrl templates plug-in.

    * 
Scripts and stylesheets can be declared to XOOPS using the theme class addScript and addStylesheet methodsThe theme instance is available after the inclusion of header.php by using the $xoTheme global variable, and in a template variable of the same name:
      <{
$xoTheme->addStylesheet('modules/newbb/style.css')}>
    * 
Images and medias URLs have to be generated by using the xoImgUrl plug-in in your templates:
      <
img src="<{xoImgUrl modules/newbb/images/reply.png}>" alt="reply" />

Output resources overriding for designers

Designers can also provide custom versions of most output
-related resources using a mechanism similar to the one available to templates, for modules that support this.

    * 
To create a custom stylesheet that will replace modules/newbb/style.csscreate your customized file in <yourthemefolder>/modules/newbb/style.css
    
To create a custom image that will replace modules/newbb/images/reply.pngcreate your customized file in <yourthemefolder>/modules/newbb/images/reply.png

3
SERB-4-LIFE
Re: Each theme to have different template sets

Thanks a lot, i'll try that out later.

4
snow77
Re: Each theme to have different template sets
  • 2006/11/27 0:43

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


Forgot to mention a very nice tutorial Alain01 made:
Templates overriding : a small Tutorial

Login

Who's Online

404 user(s) are online (303 user(s) are browsing Support Forums)


Members: 0


Guests: 404


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