| 1 |
Public pages |
| 2 |
============ |
| 3 |
|
| 4 |
Presentation |
| 5 |
------------ |
| 6 |
|
| 7 |
Public pages are an easy way to build pages based on LL::NG portal skin. |
| 8 |
You can for example create a page for a legal notice or usage instructions. |
| 9 |
|
| 10 |
A public page is just a template created in the ``public/`` subdirectory of the skin, for example ``test.tpl``. |
| 11 |
|
| 12 |
This page can then be displayed with this URL: |
| 13 |
http://auth.example.com/public/test |
| 14 |
|
| 15 |
Plugin activation |
| 16 |
----------------- |
| 17 |
|
| 18 |
You need to enable this plugin as a custom plugin. |
| 19 |
|
| 20 |
Add ``::Plugins::PublicPages`` to the custom plugins list in your configuration. |
| 21 |
|
| 22 |
Page creation |
| 23 |
------------- |
| 24 |
|
| 25 |
Create the new page: |
| 26 |
|
| 27 |
:: |
| 28 |
|
| 29 |
vi /var/lib/lemonldap-ng/portal/skins/bootstrap/public/legal.tpl |
| 30 |
|
| 31 |
.. code-block:: html |
| 32 |
|
| 33 |
<TMPL_INCLUDE NAME="header.tpl"> |
| 34 |
|
| 35 |
<div class="container"> |
| 36 |
<div class="alert alert-success"> |
| 37 |
Important legal notice |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
|
| 41 |
<TMPL_INCLUDE NAME="footer.tpl"> |
| 42 |
|
| 43 |
Display the page: http://auth.example.com/public/legal |
| 44 |
|
| 45 |
.. tip:: |
| 46 |
|
| 47 |
If you use a custom skin, you need to create the ``public/`` directory in the skin templates directory. |
| 48 |
|
| 49 |
.. warning:: |
| 50 |
|
| 51 |
A default test page is provided (``test.tpl``), you can use it as an example and delete it if you don't need it. |
| 52 |
|