-
Notifications
You must be signed in to change notification settings - Fork 12
SkelView
Jan Max Meyer edited this page Feb 7, 2019
·
3 revisions
The macro file skelview.html provides collection of macros used for ViUR skeleton rendering in Jinja2/HTML.
-
SkelViewRelBoneFormat()
is (mostly internally) used to replace values in a format string -
SkelViewBone()
is used to render the value of one bone -
SkelView()
is used to render a skeleton -
CatSkelView()
is used to render a skeleton and grouping bones into their categories
{% from "macros/skelview.html" import SkelView %}
{{ SkelView(skel) }}
{% from "macros/skelview.html" import CatSkelView %}
{{ CatSkelView(skel) }}
Available options (see macros for implementation details):
-
cssBaseClass
allows to override the CSS-base class for styling -
drillDepth
when specified > 0, then relationalBones are deep-rendered also -
drillFull
when specified, loads the entire referenced skeleton and outputs it -
drillIgnore
paths to ignore when diving into relationalBone -
emptyValue
allows to define how unset values are displayed (default: "-") -
ignore
allows to specifiy a list of paths to be ignored -
module
defines the module to whichskel
matches; If this is not provided,moduleName()
is called. -
paths
allows to specify a list of paths to view. A path can also be something like "reference.dest.name" When this is left empty, all visible fields are printed, except ingored ones -
options
defines a dictionary with advanced options; This is the newer way to supply customizatons to the macros. See section below for further information.
Options to SkelView styling and behavior are supplied using the option
dictionary.
Defines if hidden bones would be generally shown.
options={"showHidden": True}
If set, bones containing a key are rendered as a link to the URL provided as keyLink
.
The provided value may contain variables in the format
options={"keyLink": "/$(module)/view/$(key)?style=raw"}