php - How to render a view/template inside CakePHP Shell? -
I am playing several chronos in the form of cake php and I need to make some documents there. Some of these are HTML which are going to be converted to PDF, some of them are email with HTML content. I have templates / ideas for this and I am able to present them through the controller. How can I provide them in the shell?
Currently I am using some strings to replace some tokens, but I need it, but it is dirty and I need functionality like templates like loops and conditions
Smarter has smerty- & gt; Fetch () CodeIgniter in $ this- & gt; Load-> View () is how is done in kppp?
In Cake 1.3:
Application :: Import ('Controller '); $ This- & gt; View = new view (new controller (wrong)); $ This- & gt; View- & gt; Visibility = 'element'; Copy $ this- & gt; View- & gt; Element ($ name, $ params); 3.x in cake
$ view = new view (); Copy $ view- & gt; Element ($ name, $ params);
Comments
Post a Comment