Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Commit a56bff4

Browse files
author
Marvin Kuhn
committed
updated readme for better usage description
1 parent 349afc1 commit a56bff4

1 file changed

Lines changed: 56 additions & 16 deletions

File tree

README.md

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,67 @@
1-
# NEOS error pages
2-
[![Latest Stable Version](https://poser.pugx.org/breadlesscode/neos-error-pages/v/stable)]()
3-
[![Downloads](https://img.shields.io/packagist/dt/breadlesscode/neos-error-pages.svg)]()
4-
[![license](https://img.shields.io/github/license/breadlesscode/neos-error-pages.svg)]()
1+
# Neos error pages
52

6-
This package provides multible error pages for your NEOS CMS site.
7-
You can have a error page for each sub folder, this package shows the nearest error page.
3+
[![Latest Stable Version](https://poser.pugx.org/breadlesscode/neos-error-pages/v/stable)](https://packagist.org/packages/breadlesscode/neos-error-pages)
4+
[![Downloads](https://img.shields.io/packagist/dt/breadlesscode/neos-error-pages.svg)](https://packagist.org/packages/breadlesscode/neos-error-pages)
5+
[![License](https://img.shields.io/github/license/breadlesscode/neos-error-pages.svg)](LICENSE)
6+
[![GitHub stars](https://img.shields.io/github/stars/breadlesscode/neos-error-pages.svg?style=social&label=Stars)](https://github.com/breadlesscode/neos-error-pages/stargazers)
7+
[![GitHub watchers](https://img.shields.io/github/watchers/breadlesscode/neos-error-pages.svg?style=social&label=Watch)](https://github.com/breadlesscode/neos-error-pages/subscription)
8+
9+
This package provides multiple error pages for your Neos CMS site.
10+
You can add an error page for each subfolder; this package shows the nearest
11+
error page from the entry point.
812

913
## Installation
10-
Install this package in your NEOS project root.
1114

15+
Most of the time you have to make small adjustments to a package (e.g., the
16+
configuration in `Settings.yaml`). Because of that, it is important to add the
17+
corresponding package to the composer from your theme package. Mostly this is the
18+
site package located under `Packages/Sites/`. To install it correctly go to your
19+
theme package (e.g.`Packages/Sites/Foo.Bar`) and run following command:
20+
21+
```bash
22+
composer require breadlesscode/neos-error-pages --no-update
1223
```
13-
composer require breadlesscode/neos-error-pages
14-
```
15-
Nearly zero configuration!
24+
25+
The `--no-update` command prevent the automatic update of the dependencies.
26+
After the package was added to your theme `composer.json`, go back to the root
27+
of the Neos installation and run `composer update`. Your desired package is now
28+
installed correctly.
1629

1730
## Usage
1831

19-
1. Create your error page in your dimension.
20-
2. Select the correct status codes in the NEOS inspector.
21-
3. Publish
32+
1. Configure the node type
33+
2. Configure the fusion prototype
34+
3. Add one error page to your site root
2235

23-
## Todo
24-
- [ ] Write some tests (as always...)
36+
### `Breadlesscode.ErrorPages:Page`
37+
38+
The node type `Breadlesscode.ErrorPages:Page`does inherit from `Neos.Neos:Document`.
39+
There are no child nodes defined, so if you want to add content elements to your
40+
error page, you have to add a ContentCollection to the node type.
41+
42+
```
43+
'Breadlesscode.ErrorPages:Page':
44+
childNodes:
45+
main:
46+
type: 'Neos.Neos:ContentCollection'
47+
```
48+
49+
To overwrite the document with your custom document you can do it like this:
50+
51+
```fusion
52+
prototype(Breadlesscode.ErrorPages:Page) >
53+
prototype(Breadlesscode.ErrorPages:Page) < prototype(Vendor.Foo:Page.Document)
54+
```
55+
56+
### Fusion path
57+
58+
`errorPages` is the fusion path which gets rendered if an error page gets shown.
59+
Make sure it has the same look as when you go directly to the page.
2560

2661
## License
27-
The MIT License (MIT). Please see [License File](LICENSE) for more information.
62+
63+
The MIT License (MIT). Please see [License File](LICENSE) for more information.
64+
65+
## Contributors
66+
- [Breadlesscode](https://github.com/breadlesscode)
67+
- [Jonnitto](https://github.com/jonnitto)

0 commit comments

Comments
 (0)