How to make "no template"?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
User avatar
Augustas
Forum Members
Forum Members
Posts: 241
Joined: Wed Oct 17, 2007 6:09 pm
Location: the world

How to make "no template"?

Post by Augustas »

Hello,

My module registers a Content Type "MyType".
The page, created with content of "MyType" should display huge amount of data which is taken from Remote Database.
To make it simple, I prefer to have my own template which contains all the info, including MetaTags, footers, etc
under /modules/MyModule/template/ folder.

In other words I do not want that the template associated with that MyType Content Page to be loaded.

I looked in the module "Printing", and it uses this command to skip the associated template:

Code: Select all

$html = $smarty->fetch('template:notemplate') . "\n";
Unfortunately, when I try to do the same, the page loads for couple of seconds (longer than normal) and in the end [glow=beige,2,300]shows blank page[/glow].

Since this approach does not work, I am forced to do it in the following way:

1. in the template associated with Page of MyType Content, I wrote ONLY this

Code: Select all

{content}
Nothing more in this template!

2. Then, my module's "default" action process the template form a .tpl file in /modules/MyModule/template/

This solution works the way I want, but I believe I am missing some features of CMSms system.

I would like to know how I could solve this issue using built-in CMSms functionality?

Thanks
http://FollowTheRoad.com/ - living on the road...
http://www.kligys.com/ - asmeninis blog'as...
Post Reply

Return to “Developers Discussion”