how to include php file into presenter o view

Notice: This thread is very old.
frankmaniaz
Member | 8
+
0
-

a file arrays content into presenter o views

CZechBoY
Member | 3608
+
0
-

Do you want print array that you define in Presenter? Else I don't understand :-(

Presenter.php

public function renderDefault ()
{
	$this->template->myAnimals = array('dog', 'cat');
}

Template.latte

{foreach $myAnimals as $animal}
	{$animal}
{/foreach}

Last edited by CZechBoY (2016-03-17 20:47)