How can i use the same file.latte on diferents actions methods

Notice: This thread is very old.
alnux
Member | 139
+
0
-

Hi again my question is how can i use the same latte file on diferents actions this more specific on create and edit options as you know is practically the same view and i uncomfortable creating create.latte and edit.latte with the same things. i was trying on action method but it does not work too on render methods

Tomáš Votruba
Moderator | 1114
+
0
-

Hi, show us your code and mark problematic parts.

duke
Member | 650
+
0
-

You can do:

$this->template->setFile($pathToTemplateFile);
mkoubik
Member | 728
+
0
-
public function renderCreate()
{
	// ...
}

public function renderEdit()
{
	$this->setView('create');
	// ...
}
alnux
Member | 139
+
0
-

thanks all