Skip to content
Snippets Groups Projects
Commit c4335ea4 authored by Manon Bourgognon's avatar Manon Bourgognon
Browse files

feature: add link-text attribute

parent 67cf571c
No related branches found
No related tags found
1 merge request!90feature: add link-text attribute
source/_static/images/import_documentation/widgets-examples/widget-action.png

7.24 KiB

source/_static/images/import_documentation/widgets-examples/widget-action2.png

11.2 KiB

......@@ -73,6 +73,7 @@ Attributes
value-title="My custom and static title"
></solid-display>
Also used to indicate the value of ``next`` attribute when using ``solid-action`` widget.
.. _default-field:
``default-[field]``
......@@ -104,6 +105,17 @@ Attributes
Displays a link with a ``<solid-link>`` tag with the current resource as ``data-src`` and
the value of the attribute as ``next``.
.. _link-text-field:
``link-text-[field]``
~~~~~~~~~~~~~~~~~~~~~
*Works only with solid-display-link(-mailto/tel/blank) and solid-action*
*Available from version 0.18*
Modify the displayed value as link in :
- ``<a>`` for solid-display-link,
- ``<solid-link>`` in solid-action.
.. _src-field:
``src-[field]``
~~~~~~~~~~~~~~~
......
......@@ -175,6 +175,55 @@ solid-set-div
*The border is applied on solid-set-div*
solid-action
~~~~~~~~~~~~
.. code:: html
<solid-display
data-src="data/list/user-4.jsonld"
fields="first_name, last_name, skills"
widget-skills="solid-action-label"
link-text-skills="Click to see his/her skills"
label-skills="Skills :"
src-skills="data/list/user-4-skills.jsonld"
></solid-display>
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action.png
:alt: Widget solid-action
By adding action attribute in the solid-display, a router, a route and another view, clicking on the solid-action displays the view (dotted border):
.. code:: html
<solid-router use-hash>
<solid-route
hidden
use-id
name="skills-details"
></solid-route>
</solid-router>
<solid-display
data-src="data/list/user-4.jsonld"
fields="first_name, last_name, skills"
widget-skills="solid-action-label"
link-text-skills="Click to see his/her skills"
label-skills="Skills :"
src-skills="data/list/user-4-skills.jsonld"
action-skills="skills-details"
></solid-display>
<div data-view="skills-details" hidden>
<solid-display
bind-resources
fields="name"
></solid-display>
</div>
.. figure:: ../../_static/images/import_documentation/widgets-examples/widget-action2.png
:alt: Widget solid-action
Step-by-step widget creation
----------------------------
......
......@@ -84,7 +84,7 @@ Available templates :
- **default** (no type keyword defined)
- ``action``: Displays a link inside a ``<solid-link>`` tag with ``src`` for the ``data-src`` attribute,
``value`` for the ``next`` attribute and ``label`` as text content.
``value`` for the ``next`` attribute and ``link-text`` as text content.
- ``multiple``: insert a ``solid-display`` with the ``@id`` of a container as ``data-src``.
The fields to display are chosen with the ``multiple-[field name]-fields`` attribute.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment