diff --git a/doc/Alerting/Templates.md b/doc/Alerting/Templates.md index cf34daaddf..207abf5a72 100644 --- a/doc/Alerting/Templates.md +++ b/doc/Alerting/Templates.md @@ -68,9 +68,9 @@ The Default Template is a 'one-size-fit-all'. We highly recommend defining your ## Base Templates If you'd like to reuse a common template for your alerts follow below -create a file in -` resources/views/alerts/template.blade.php` -As an example, add the following: +A default file is located in +` resources/views/alerts/templates/default.blade.php` +Displays the following: ``` @@ -78,9 +78,6 @@ As an example, add the following: LibreNMS Alert -
- From the template master -
@yield('content')
@@ -89,12 +86,12 @@ As an example, add the following: ``` The important part being the `@yield('content')` -You can use plain text or html as per Alert templates and this will form the basis of your common template. +You can use plain text or html as per Alert templates and this will form the basis of your common template, feel free to make as many templates in the directory as needed. In your alert template just use ``` -@extends('alerts.template'); +@extends('alerts.templates.default'); @section('content') {{ $alert->title }} diff --git a/resources/views/alerts/.gitignore b/resources/views/alerts/templates/.gitignore similarity index 100% rename from resources/views/alerts/.gitignore rename to resources/views/alerts/templates/.gitignore diff --git a/resources/views/alerts/templates/default.blade.php b/resources/views/alerts/templates/default.blade.php new file mode 100644 index 0000000000..1e0c265596 --- /dev/null +++ b/resources/views/alerts/templates/default.blade.php @@ -0,0 +1,11 @@ + + + + LibreNMS Alert + + +
+ @yield('content') +
+ + \ No newline at end of file