mirror of
https://github.com/opnsense/docs
synced 2024-10-30 21:20:20 +00:00
Update models_fieldtypes.rst - Add example to display multiple fields
This commit is contained in:
parent
040d2bdffe
commit
bb39d6eac8
@ -391,6 +391,21 @@ Define relations to other nodes in the model, such as to point the attribute :co
|
|||||||
</Model>
|
</Model>
|
||||||
</pipe>
|
</pipe>
|
||||||
|
|
||||||
|
To display multiple fields, the :code:`display_format` is required.
|
||||||
|
|
||||||
|
.. code-block:: xml
|
||||||
|
|
||||||
|
<pipe type="ModelRelationField">
|
||||||
|
<Model>
|
||||||
|
<pipes>
|
||||||
|
<source>OPNsense.TrafficShaper.TrafficShaper</source>
|
||||||
|
<items>pipes.pipe</items>
|
||||||
|
<display>number,description</display>
|
||||||
|
<display_format>%s - %s</display_format>
|
||||||
|
</pipes>
|
||||||
|
</Model>
|
||||||
|
</pipe>
|
||||||
|
|
||||||
.. csv-table:: ModelRelationField
|
.. csv-table:: ModelRelationField
|
||||||
:header: "Parameter", "Options", "Purpose"
|
:header: "Parameter", "Options", "Purpose"
|
||||||
:widths: 30, 20, 40
|
:widths: 30, 20, 40
|
||||||
|
Loading…
Reference in New Issue
Block a user