Suggestion: Alter metodh layout in template.php #330
pedrohsa92
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suggestion
Linha 196
public function layout($name, array $data = array())
{
$this->layoutName = $name;
$this->layoutData = array_merge($this->data, $data);
}
This makes it easier when we use layout("template::site"); ?>.
If we have declared any $data when using the render() method in the controller, this merges the data and resolves the issue. Either do a merge, or create another method, please...
Sugestão:
Linha 196
public function layout($name, array $data = array())
{
$this->layoutName = $name;
$this->layoutData = array_merge($this->data, $data);
}
Isso facilita a vida quando usamos o layout("template::site"); ?>
Se tivermos declarado algum $data quando usamos o render() no controlador, isso mescla o data e resolve. Ou faz merge, ou cria um outro método, por favor...
Beta Was this translation helpful? Give feedback.
All reactions