1
anemic
How do you add a template?
  • 2007/3/2 2:10

  • anemic

  • Just popping in

  • Posts: 36

  • Since: 2006/12/6


Hi,

I'm writing extensions to userinfo.php and would like to add a template to the system section. I've cloned the default template set and want to add a new version of system_userinfo.html so that I can work with new versions of userinfo and a corresponding template. I cannot figure out how to add a new template.

Thanks.

2
MadFish
Re: How do you add a template?
  • 2007/3/2 4:30

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


I think you need to declare the new template in the module, and then update the module to make it available. Have a look at the how to clone a block FAQ as it has some instructions on how to do this.

3
anemic
Re: How do you add a template?
  • 2007/3/2 5:15

  • anemic

  • Just popping in

  • Posts: 36

  • Since: 2006/12/6


Thanks.I knew how to copy a block but forgot that system was a module. Here's how I did it for others who want to do this.. I changed to the $xoopsroot/modules/system and added a new numbered template to the bottom of xoops_version.php that looked like this
$modversion['templates'][15]['file'] = 'system_block_dummy.html';^M
$modversion
['templates'][15]['description'] = 'Dummy template for custom blocks or blocks without templates';

and added this.
$modversion['templates'][16]['file'] = 'system_userinfo_mycopy.html';^M
$modversion
['templates'][16]['description'] = 'New UserInfo template';


I changed directories to $xoopsroot/modules/system/templates and copied system_userinfo.html to system_userinfo_mycopy.html. Then go to admin>Modules and update the system module. Then go to templates and chose my new template name and clicked generate. That's it. Thanks for the reminder!!!

Login

Who's Online

258 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 258


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