Commit 85d5a8f9 authored by Tobias Munk's avatar Tobias Munk

various help updates

parent f63fe819
......@@ -36,4 +36,9 @@ Has full backend access.
___
<code>Public:</code>
Is an unauthenticated user
\ No newline at end of file
Is an unauthenticated user
Authorizations should combined in roles and those should be assigned to users.
Depending on the module, you need to use *permissions* and/or *route Access*.
......@@ -11,7 +11,7 @@ Login with `admin` / `admin1` and change the admin password.
### :construction_worker: Create users and assign roles
![user-admin](./images/user-admin.png)
![user-admin](../images/user-admin.png)
- admin
- dev (Developer)
......@@ -24,7 +24,16 @@ Login with `admin` / `admin1` and change the admin password.
- `/settings`
![settings](./images/settings.png)
![settings](../images/settings.png)
Logout as admin.
## General information
You will find the current application identifier (`APP_NAME`) and version in the footer of the backend.
----
......@@ -39,7 +39,7 @@ ___
{{ use ('hrzg/filemanager/widgets') }}
{{ file_manager_widget_widget(
{
'handlerUrl': '/en/filefly/api'
'handlerUrl': url(['/filefly/api'])
}
) }}
......@@ -78,6 +78,15 @@ The `pages` module is a manager for sitemap trees.
- Create "hidden node" in pages
## Dashboard & Backend pages
To create a page for the backend and dashboard, add the desired route, eg. `/crud` to pages' settings.
Go to **Settings** and add `/crud` to the list in `pages.availableGlobalRoutes`.
Next add a page to the *Backend* node and select `/crud` as its route.
Authorizations are automatically checked via *route permissions*.
---
:blue_book: [Extension README](https://github.com/dmstr/yii2-pages-module/blob/master/README.md)
......@@ -7,6 +7,27 @@ If you start with your new Website, you will find these two less files:
`doro-widgets`
---
<div class="mermaid">
graph TD
AppAsset
SettingsAsset
SettingsAsset-->DbAsset
SettingsAsset-->FontAwesomeAsset
DbAsset-.-registerPrototypeAssetKey
registerPrototypeAssetKey-.-default_main.less
default_main.less-->widgets.less
default_main.less-->variables.less
AppAsset---Source_Code
</div>
---
## Doro Main
......@@ -66,3 +87,23 @@ Define your widget CSS, e.g.
@import (inline) "/app/vendor/thomaspark/bootswatch/cyborg/bootstrap.css";
@import (reference) "/app/vendor/bower/bootstrap/less/bootstrap.less";
-----
Module: Prototype
--------
This module has very limited features and has been mainly developed to create tiny static sites. It basically allows
you to add HTML and LESS files to your site.
### Create asset bundle for LESS from the database
See [Online help](https://github.com/dmstr/phd5-docs/blob/master/help/frontend-less.md)
- go to `/prototype/less`
- create key `main`
- add example LESS content
- save
......@@ -26,6 +26,16 @@ Top, Main and Bottom Cell
{{ cell_widget({id: 'top'}) }}
{{ cell_widget({id: 'main'}) }}
{{ cell_widget({id: 'bottom'}) }}
Replace Widget Edit Button e.g.
{{ cell_widget(
{
id: 'top',
positionWidgetControls: 'bottom',
positionContainerControls: 'bottom'
}
) }}
Cells with custom request params
......@@ -37,6 +47,10 @@ Cells with custom request params
}
) }}
Custom layout
{{ set(this.context, 'layout', '@backend/views/layouts/box') }}
## Meta-Tags
......@@ -49,6 +63,31 @@ You can register meta tags or link tags in global Twig widgets
}
) }}
## Twig Example Favicon
{# Header Link Tags #}
{{ this.registerLinkTag({'rel':'icon','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Ffavicon.ico'}) }}
{{ this.registerLinkTag({'rel':'apple-touch-icon','size':'180x180','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Fapple-touch-icon.png'}) }}
{{ this.registerLinkTag({'rel':'icon','type':'image/png','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Ffavicon-32x32.png'}) }}
{{ this.registerLinkTag({'rel':'icon','type':'image/png','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Ffavicon-16x16.png'}) }}
{{ this.registerLinkTag({'rel':'manifest','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Fmanifest.json'}) }}
{{ this.registerLinkTag({'rel':'mask-icon','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Fsafari-pinned-tab.svg','content':'#7a0727'}) }}
{{ this.registerMetaTag({'name':'theme-color','content':'#FFFFFF'}) }}
## Twig Example Open Graph
{# Open Graph Tags #}
{{ this.registerMetaTag({'property':'og:title','content':'Neue Spinnerei - Restaurant & Bar'}) }}
{{ this.registerMetaTag({'property':'og:description','content':'Neues Leben ist erwacht in den Räumen der ehemaligen Baumwollspinnerei Aathal. Im Restaurant mit 150 Sitzplätzen servieren wir Ihnen ein kreatives Angebot an frisch gekochten Speisen.'}) }}
{{ this.registerMetaTag({'property':'og:url','content':'http://www.neue-spinnerei.ch.staging-2.oneba.se/de'}) }}
{{ this.registerMetaTag({'property':'og:image','content':'//www.neue-spinnerei.ch.staging-2.oneba.se/de/filefly/api?action=stream&path=%2Fbrand%2Fopengraph%2Ffacebook-img.jpg'}) }}
{{ this.registerMetaTag({'property':'og:image:width','content':'600'}) }}
{{ this.registerMetaTag({'property':'og:image:height','content':'337'}) }}
{{ this.registerMetaTag({'property':'og:image:type','content':'image/jpeg'}) }}
## JavaScript snippet
......@@ -58,6 +97,54 @@ You can register meta tags or link tags in global Twig widgets
{% endset %}
{{ this.registerJs(js) }}
---
___
## Twig Example Favicon
{# Header Link Tags #}
{{ this.registerLinkTag({'rel':'icon','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Ffavicon.ico'}) }}
{{ this.registerLinkTag({'rel':'apple-touch-icon','size':'180x180','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Fapple-touch-icon.png'}) }}
{{ this.registerLinkTag({'rel':'icon','type':'image/png','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Ffavicon-32x32.png'}) }}
{{ this.registerLinkTag({'rel':'icon','type':'image/png','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Ffavicon-16x16.png'}) }}
{{ this.registerLinkTag({'rel':'manifest','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Fmanifest.json'}) }}
{{ this.registerLinkTag({'rel':'mask-icon','href':'/filefly/api?action=stream&path=%2Fbrand%2Ffavicon%2Fsafari-pinned-tab.svg','content':'#7a0727'}) }}
{{ this.registerMetaTag({'name':'theme-color','content':'#FFFFFF'}) }}
## Twig Example Open Graph
{# Open Graph Tags #}
{{ this.registerMetaTag({'property':'og:title','content':'Neue Spinnerei - Restaurant & Bar'}) }}
{{ this.registerMetaTag({'property':'og:description','content':'Neues Leben ist erwacht in den Räumen der ehemaligen Baumwollspinnerei Aathal. Im Restaurant mit 150 Sitzplätzen servieren wir Ihnen ein kreatives Angebot an frisch gekochten Speisen.'}) }}
{{ this.registerMetaTag({'property':'og:url','content':'http://www.neue-spinnerei.ch.staging-2.oneba.se/de'}) }}
{{ this.registerMetaTag({'property':'og:image','content':'//www.neue-spinnerei.ch.staging-2.oneba.se/de/filefly/api?action=stream&path=%2Fbrand%2Fopengraph%2Ffacebook-img.jpg'}) }}
{{ this.registerMetaTag({'property':'og:image:width','content':'600'}) }}
{{ this.registerMetaTag({'property':'og:image:height','content':'337'}) }}
{{ this.registerMetaTag({'property':'og:image:type','content':'image/jpeg'}) }}
## Twig Example Google Analytics
{# Google Analytics Code #}
{% set trackingCode %}
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-50480922-1', 'auto');
ga('send', 'pageview');
{% endset %}
{{ this.registerJs(trackingCode) }}
___
## References
......@@ -171,7 +258,7 @@ Enable **setting** `app.layout.enableTwigNavbar` and create a **prototype/twig**
{{ nav_bar_end() }}
#### Lanuage Menu
#### Language Menu
{% set languageItems = [
{
......@@ -192,6 +279,12 @@ Enable **setting** `app.layout.enableTwigNavbar` and create a **prototype/twig**
}
) }}
### Cookie Consent
{{ use('cinghie/cookieconsent/widgets') }}
{{ cookie_widget_widget() }}
#### Items from application params
{% set contextItems = app.params['context.menuItems'] %}
......@@ -228,6 +321,19 @@ Enable **setting** `app.layout.enableTwigNavbar` and create a **prototype/twig**
}
) }}
### Filemanager
{{ use ('hrzg/filemanager/widgets') }}
{{ file_manager_widget_widget(
{
"handlerUrl": "/#{app.language}/filefly/api"
}
) }}
### Set a layout
{{ set(app.controller, 'layout', '@backend/views/layouts/main') }}
### Links
......
......@@ -17,3 +17,8 @@ The `settings` module provides an easy to use key/value-storage.
- `<markdocs>.defaultIndexFile`
- `<markdocs>.cachingTime`
- `<markdocs>.htmlUrl`
----
TBD: Asset bundles via Settings
\ No newline at end of file
# Translations
## Configuration
To localize your application check if your desired application language exists and activate it. If not you need to create it first via `/translatemanager/language/create`, please make sure to use the exact same language code as in your application, eg. `de` or `de-DE`.
## Usage
To translate items click on the list-icon in the languages view and add translations to the list.
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment