arshaw/phpti — Issue #8: Feature Request: Simple String Block
Author: kvcrawford
Created: 2012-02-18 02:20:37+00:00
State: open

It would be nice if there was a function to set a small string, rather than a whole block of markup. For example, I like to pass a class attribute from each page to its base layout.

I've written my own way to accomplish it for now, but I feel like it could be done better. I added this function to ti.php:

```php
function set($key, $value){
startblock($key, 'trim');
echo $value;
endblock($key);
}
```

To use it, in the layout file I use`` or ``
to set it In the child page, I write ``

Thanks for this handy little library!