Maslosoft Staple API
Class TagExtractor
Tag Extractor
This class extracts selected tags from view and pass it to layout.
Tags can have any name, they do not have to be html compliant, as they are used only internally.
Tags will be removed from view. Should not contain any attributes, as they are extracted in a very simple and not recommended (but fast) method.
If tag contains any attribute it will not be processed.
Example tags:
<title>My page title</title>
<pre>This will be passed to template <span class="php-keyword1">and</span> can be used, <span class="php-keyword1">for</span> instance in document head <span class="php-keyword1">as</span> a title:</pre>php
<head>
<title><?= $this->data->title;?></title>
</head>
<pre>This can also be used with Template Applier to <span class="php-keyword1">use</span> different template <span class="php-keyword1">for</span> any page:</pre>html
<template>product</template>
This will lookup for product.php
file in your layouts directory. If template
exists it will be used by Template Applier (if it's enabled).
- Maslosoft\Staple\Processors\Pre\TagExtractor implements Maslosoft\Staple\Interfaces\PreProcessorInterface
Author: Piotr Maselkowski
Located at Processors/Pre/TagExtractor.php
Methods summary
public
|
|
public
|