Templates

Templates are displayed via @\template(template_name, arg1, arg2) (args depend on the template)

Also See: @see_files(docs/ASTTemplates.md; AST Templates, docs/MarkdownVerbs.md; Markdown Verbs, docs/Configuration.md; Configuration)

Docs

  • Create Templates
  • Built-in Templates

Create Templates

  1. Configure your template directories: "dir.templates":['rel/dir1','rel/dir2'] (see @see(docs/Configuration.md, Configurations))
  2. Create a .md.php file in your template directory that outputs a string. See @see(doctemplate/Scrawl, Examples).
  3. Code your template.
    • @\template(name, arg1, arg2) will load name.md.php in one of your template dirs.
    • array $args will be passed to the template file.
    • $this refers to the \Tlf\Scrawl instance.

Tip: $scrawl->template_dirs[] = $absolute_path can be used to add additional template directories. Use this if you create an @see(docs/Extensions.md, Extension) and want to expose template files for others to use.

Note: template_dir/ClassList.md.php is named ClassList, template_dir/php/FunctionList is named php/FunctionList

Built-in Templates

@template(Scrawl/ShortBuiltInTemplatesList)

@template(Scrawl/BuiltInTemplates)