Skip to content

skewwhiffy/PhpMvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Templating for views

$model is a special variable used in views, and is passed in by the controller or another view.

ViewTags come in different flavours.

<@ template = BLAH_TEMPLATE @>
This is a template tag. The path to the template is BLAH_TEMPLATE. The templater
will look inside the /Content/Views/ folder for the template.

<@ templatemodel = $model.getTemplateModel() @>
This is a template model tag, used to define how the template's model is defined,
usually from the model passed to the view.

<@=EXPRESSION @>
This is an expression tag. This is shorthand for <?php echo EXPRESSION ; ?>.

<@ container = BLAH @>
This is a container tag. This indicates where content goes in a template.

<@ content = BLAH @>
These are content tags, used for defining where content goes into containers
in the containing template. This pair of content tags belong inside the container
called BLAH.
<@ endcontent @>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages