templates y layouts

Registered by Emilio Silveira

Lo que se conocia anteriormente como layouts, vienen a ser ahora los templates, y se ubican en el directorio templates, en el controlador se asigna de la siguiente manera.

$this->template = 'prueba';

Y se pueden anidar facilmente:

$this->template = array('a', 'b', 'c');

Renderizandose primero, 'a', dentro de 'b' y 'b', dentro de 'c'. atraves de View::content()

Los layouts vienen a formar las capas mas exteriores, el index.phtml viene a ser ahora el layout default.phtml, y esta ubicado en el directorio layouts. Esto permite tener layouts para html, xhtml, xml y cualquier otra cosa. en el controlador se asigna de la siguiente manera.

$this->layout = 'prueba';

Y se pueden anidar facilmente:

$this->layout = array('a', 'b', 'c');

Renderizandose primero, 'a', dentro de 'b' y 'b', dentro de 'c'. atraves de View::content()

Asimismo en ambos es posible aplicar un objeto View.

$this->template = new View('a');
$this->layout = new View('b');

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
Emilio Silveira
Definition:
Obsolete
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Emilio Silveira
Completed by
Emilio Silveira

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.