mirror of
https://github.com/opnsense/docs.git
synced 2026-06-08 16:12:04 -04:00
Update models_fieldtypes.rst - Add example to display multiple fields (#551)
This commit is contained in:
parent
040d2bdffe
commit
94ee5e68e6
1 changed files with 15 additions and 0 deletions
|
|
@ -391,6 +391,21 @@ Define relations to other nodes in the model, such as to point the attribute :co
|
|||
</Model>
|
||||
</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
|
||||
:header: "Parameter", "Options", "Purpose"
|
||||
:widths: 30, 20, 40
|
||||
|
|
|
|||
Loading…
Reference in a new issue