Skip to content

Commit

Permalink
Syntax highlighting for readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Wilkins committed Feb 17, 2015
1 parent 2e972ff commit 6972013
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ Notifier for Craft is a plugin that provides Airbrake notifications to Codebase

1. Copy the included `notifier` directory into `craft/plugins`.
2. Use Composer to install the required libraries:

`curl -s http://getcomposer.org/installer | php`
`php composer.phar install`

3. Navigate to the **Plugins** settings in the CP and install Notifier.
4. Add the URL to the Codebase or Airbrake.io notifier and the necessary API key.

Expand All @@ -21,15 +17,19 @@ You can use Notifier in your plugins or in your templates.

You can send notifications to Notifier using the sendToNotifier hook:

craft()->plugins->call('sendToNotifier', array('The message...'));
```php
craft()->plugins->call('sendToNotifier', array('The message...'));
```

### Twig Template Usage

Notifier can be used in templates to send notifications when someone tries to access an invalid page, or when the template can't find the content it should.

{% if craft.entries.section('blog') | length == 0 %}
craft.notifier.notify('No blog posts were found.')
{% endif %}
```twig
{% if craft.entries.section('blog') | length == 0 %}
craft.notifier.notify('No blog posts were found.')
{% endif %}
```

## Coming Soon

Expand Down

0 comments on commit 6972013

Please sign in to comment.