1
zer0fill
Legal to add sub-dir in /mymodule/template/?
  • 2003/12/19 21:10

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


I'm trying to port over some of my smarty-enabled apps to XOOPS but my template structure might not be compatible with the current version of smarty.

ex:
templates/
-header.tpl
-footer.tpl
-/info/leader.tpl
-/info/local.tpl

since i used subdirectories to help organize the template layout, will this produce errors?
$modversion['templates'][1]['file'] = 'info/leader.tpl';
$modversion['templates'][1]['description'] = '';

$modversion['templates'][2]['file'] = 'info/local.tpl';
$modversion['templates'][2]['description'] = '';


thanks

[edit]
after looking more into the code, i dont think this should be a problem as i can just include the mainfile the same way i declared the templates ('info/local.tpl')

what's the resoning behind initalizing the templates in modversion if our .php files will be calling the files?

[edit2]
guessing: Does it has to do with caching (init templates in $modversion). i started poking around xoops_tplfile

[edit3]
and a very important reason to add it to the database
<{include file="db:system_comments_thread.html"}>

2
Draven
Re: Legal to add sub-dir in /mymodule/template/?
  • 2003/12/19 23:47

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


Yes, it in the mod version for caching the pages into the DB. When installing a module the install script creates entried for each template in the template directory.

Login

Who's Online

138 user(s) are online (79 user(s) are browsing Support Forums)


Members: 0


Guests: 138


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