Skeleton

Skeleton is a cool features from Walrus framework intended for front end developer. You can create your skeleton (which are basically view aggregation), in the config/skeleton/ directory

All configuration YAML files in walrus are parsed to PHP array, you can create all the files you want in the correct configuration directory

Skeleton example

This is a simple skeleton example:

    _skeleton_name:
        head:
            template: "header/head"
        body:
            template: "body/main"
        footer:
            template: "footer/footer"

In this example, Walrus will execute those template:

  • www/templates/header/head.?
  • www/templates/body/main.?
  • www/templates/footer/footer.?
ACL

In can easily add ACL restriction to the template you use in a skeleton by following specifying the ACL parameter for a template

    _skeleton_name:
        head:
            template: "header/head"
            acl: 'admin'
        footer:
            template: "footer/main"