1
dixsense
Template override
  • 2009/10/29 10:18

  • dixsense

  • Just popping in

  • Posts: 3

  • Since: 2009/9/23


I got a problem in my module that want to use defferent interface's page.
I search found "Template override" That can change page different strand page in module.
But I dont know how to use Template override in my module.
Some one can help me.

2
ghia
Re: Template override
  • 2009/10/29 10:29

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What is the version and name of your module?

3
kris_fr
Re: Template override
  • 2009/10/29 11:11

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31



4
ghia
Re: Template override
  • 2009/10/29 12:02

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
you have see
Probably yes, because the link was mentioned in the first post.

5
dixsense
Re: Template override
  • 2009/11/13 3:04

  • dixsense

  • Just popping in

  • Posts: 3

  • Since: 2009/9/23


xoops 2.3.3
It is Module that I develop by myself.
I want to know how to override template such as module system (themename/modules/system/system_redirect.html) , news.
I not that is say "override template" but it is a part of themes That can theme of module.
So I can to do its in xoops. Thank.

6
ghia
Re: Template override
  • 2009/11/13 8:49

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Template overloading (or overriding) is done automatically by the core. The module has nothing to do for it, nor has it control. It simply loads the template:
include_once '../../mainfile.php';
$xoopsOption['template_main'] = 'news_archive.html';
include_once 
XOOPS_ROOT_PATH.'/header.php';
which was enlisted before in xoops_version.php
$modversion['templates'][1]['file'] = 'news_archive.html';
$modversion['templates'][1]['description'] = 'Archive listing';
The basic templates are stored in the module subdirectory templates.
Items are added to the template:
$xoopsTpl->assign('show_articles'true);
$xoopsTpl->assign('lang_articles'_NW_ARTICLES);
$xoopsTpl->assign('currentmonth'$months_arr[$frommonth]);
To have a themed overload, just provide the file in the theme:
themename/modules/modulename/templatename.htm



7
dixsense
Re: Template override
  • 2009/12/14 13:50

  • dixsense

  • Just popping in

  • Posts: 3

  • Since: 2009/9/23


Yes, I understand template override. Im just create HTML file as the template that I what override in folder themes/myTheme/modules/moduleName .
But my problem is my page don't theme such as system_redirect.html .

Can you tell me How to use template with out theme.
by not include/require file header.php and footer.php

Login

Who's Online

240 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 240


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