mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update base template (#8973)
This commit is contained in:
committed by
Neil Lathwood
parent
f9525714f7
commit
7f16e586a7
@@ -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>
|
||||
Reference in New Issue
Block a user