Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
husseinalhammad committed Jul 31, 2018
1 parent fa513b6 commit 4d7cd00
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
# Linebreak Template Filter

The template filter adds inserts HTML line breaks `<br>` before new lines in a `textarea` field type.
The [template filter](https://docs.grabaperch.com/api/template-filters/) inserts HTML line breaks `<br>` before new lines in a `textarea` field type.


## Installation

- Download the latest version of the template filter
- Unzip the download
- Place the `PipitTemplateFilter_linebreak.class.php` file in the folder `perch/addons/templates/filters/`
- Include the class in the file `perch/addons/templates/filters.php`:

```php
include('filters/PipitTemplateFilter_linebreak.class.php');
```

You also need to enable template filters in your config:

```php
define('PERCH_TEMPLATE_FILTERS', true);
```



## Usage

```markup
<perch:content id="address" type="textarea" label="Company Address" filter="linebreak">
<p>
<perch:content id="address" type="textarea" label="Company Address" filter="linebreak">
</p>
```


Expand Down

0 comments on commit 4d7cd00

Please sign in to comment.