feature: allow external link on menu
This commit is contained in:
parent
f6320fa6f1
commit
77a1d2bd4d
19
README.md
19
README.md
@ -734,6 +734,25 @@ Module declaration, on `config.json`:
|
||||
|
||||
You need the experimental routing enabled to have a Profile Directory.
|
||||
|
||||
### Add link to left menu
|
||||
|
||||
```
|
||||
{
|
||||
"type": "link",
|
||||
"parameters": {
|
||||
"icon": "icon-docs",
|
||||
"name": "some.path",
|
||||
"target": "https://startinblox.com"
|
||||
},
|
||||
"route": true
|
||||
},
|
||||
```
|
||||
|
||||
Where:
|
||||
* `parameters.icon` is a valid simple line icon
|
||||
* `parameters.name` is a path to a translation. You can create your own with the lang component
|
||||
* `parameters.target` is the target URL
|
||||
|
||||
### Route generation
|
||||
|
||||
Orbit will, by default, generate an unique route for every of your module. You can customize this route by setting a `route` attribute on your module declaration.
|
||||
|
@ -168,6 +168,12 @@ solid-router#navbar-router(default-route=defaultRoute)
|
||||
div.segment.icon.icon-small.icon-calendar
|
||||
div.segment.text-uppercase.text-letter-spacing-large(data-trans="menuLeft.events")
|
||||
div.divider
|
||||
if component.type == "link"
|
||||
a.menu-tab.segment.full.padding-xsmall.text-semibold.text-color-white.heading-active.bg-color-heading.transparent-background.hover.active(href=component.parameters.target, target="_blank")
|
||||
div.segment.margin-right-xxsmall
|
||||
div.segment.icon.icon-small&attributes({"class": component.parameters.icon})
|
||||
div.segment.text-uppercase.text-letter-spacing-large(data-trans=component.parameters.name)
|
||||
div.divider
|
||||
if componentSet.has('registering')
|
||||
solid-route(name='join-community', use-id, hidden)
|
||||
solid-route(name='login', hidden)
|
||||
|
Loading…
Reference in New Issue
Block a user