Hi, I have looked for coding in News, Quizzard and a couple of others. What I can't really detect/find is how templates stored in _module_templates are handled. I'm able to retrieve the template, but all mentioned modules seem to handle the template update/storing in a different way.
Questions that I have:
1 - Which module contains a straightforward method of handling database templates?
2 - Would it not be a great thing if one of the handling is in the developers documentation, so new developers develop in a similar way (and thus pushing the quality of the module to a higher level)?
Thanks,
Duketown
[Solved] How to use database template in new module
[Solved] How to use database template in new module
Last edited by Duketown on Wed Oct 17, 2007 9:59 pm, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: How to use database template in new module
The questions module handles multiple database templates in a relatively straightforward way. The database templates are handled with the 'SetDatabase' and 'GetDatabase' call.
The questions module is a good clean example module to work with.
But yes, the developers docs need updating. We've been too busy working writing them to worry about documenting the process.
The questions module is a good clean example module to work with.
But yes, the developers docs need updating. We've been too busy working writing them to worry about documenting the process.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: How to use database template in new module
OK,
Thanks calguy1000. I'll try the questions module.
I do understand the part of the documentation with so much going on at this moment. And as in many cases the documentation is following after some time.
Thanks calguy1000. I'll try the questions module.
I do understand the part of the documentation with so much going on at this moment. And as in many cases the documentation is following after some time.
Re: How to use database template in new module
All,
I did some homework and prepare a step-by-step guide on how to include a database driven template.
You can find it in the developers part of wiki: http://wiki.cmsmadesimple.org/index.php/User_Handbook/Developers_Guide/Creating_Modules#Insert_database_driven_templates
Have fun with it,
Duketown
The guide was prepared and tested with version 1.0.8
I did some homework and prepare a step-by-step guide on how to include a database driven template.
You can find it in the developers part of wiki: http://wiki.cmsmadesimple.org/index.php/User_Handbook/Developers_Guide/Creating_Modules#Insert_database_driven_templates
Have fun with it,
Duketown
The guide was prepared and tested with version 1.0.8