Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Render a partial from a task in Symfony 1.4

I'm trying to render a partial in a Symfony task and having no luck. I found docs in 1.1 that say to just call get_partial() but apparently that's no longer readily available in 1.4. I tried loading the helper manually with sfLoader::getHelpers('Partial'); but I get "Class sfLoader not found". Any help would be greatly appreciated.

For reference what I'm trying to do is generate an HTML file called 'header.html' from my global header partial used in all of my layouts for inclusion in a third-party forum I'm integrating (Simple Machines/SMF).

like image 373
nortron Avatar asked Dec 08 '22 03:12

nortron


1 Answers

First load:

sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');

then just call:

get_partial()
like image 122
Faraona Avatar answered Jan 31 '23 10:01

Faraona