Skip to content

Classes: Create view cell #41

Open

Description

@mihaivarga

ViewCell should be a controller that renders as a variable with toString processing to html.

View cells can be used for common templates with controller rendering between components.

example:

user.cell.php
user.cell.tpl

class UserCell extends ViewCell {
function display(){
$this->assign('var',$value)
}
}

Loading View Cell in controllers:

$userCell=$this->cell('user');
$this->assign('usercell',$userCell);

Showing a cell in a view:

{$usercell}

Loading a cell directly in template:

{viewcell name="user"}

Activity

  1. added this to the 2.8 milestone on Jan 13, 2017
  2. self-assigned this
    on Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions