EllisLab text mark
Advanced Search
     
Invoking the rendering of a template from an extension
Posted: 03 December 2009 07:11 PM   [ Ignore ]
Joined: 2009-09-16
1 posts

Hi,

is it possible to invoke the rendering of a template from within an extension? The idea is to add a button to the edit and publish control panel tabs which will save a specified template’s output into a row in the database which can be later be used for mailshot purposes. I know Django has a clear MVC separation and allows this through the Template class:

http://docs.djangoproject.com/en/dev/ref/templates/api/#rendering-a-context/

A roundabout way of doing this could be to invoke something like:

http://scripts.incutio.com/httpclient/

to download the response from the blog’s “live look” url, but I don’t know how well a third party library would work from within an Expression Engine extension.

Does anyone have any experience of this type of thing?

Cheers,
Donny.