Update base template (#8973)

This commit is contained in:
Paul Heinrichs
2018-08-02 08:27:29 +01:00
committed by Neil Lathwood
parent f9525714f7
commit 7f16e586a7
3 changed files with 16 additions and 8 deletions
+5 -8
View File
@@ -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:
```
<html>
@@ -78,9 +78,6 @@ As an example, add the following:
<title>LibreNMS Alert</title>
</head>
<body>
<div>
From the template master
</div>
<div class="container">
@yield('content')
</div>
@@ -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 }}
@@ -0,0 +1,11 @@
<html>
<head>
<title>LibreNMS Alert</title>
</head>
<body>
<div class="container">
@yield('content')
</div>
</body>
</html>