A RelationTag object is an object which allows to link a configuration information to a relation definition. For instance, the standard primary view uses a RelationTag object (uicfg.primaryview_section) to get the section to display relations.
# display ``entry_of`` relations in the ``relations`` section in the ``BlogEntry`` primary view
uicfg.primaryview_section.tag_subject_of(('BlogEntry', 'entry_of', '*'),
'relations')
# hide every relation ``entry_of`` in the ``Blog`` primary view
uicfg.primaryview_section.tag_object_of(('*', 'entry_of', 'Blog'), 'hidden')
Note
The part of uicfg that deals with primary views is in the Primary view configuration chapter.
This module (cubicweb.web.uicfg) regroups a set of structures that may be used to configure various options of the generated web interface.
To configure the interface generation, we use RelationTag objects.
indexview_etype_section: | |
---|---|
entity type category in the index/manage page. May be one of:
|
actionbox_appearsin_addmenu: | |
---|---|
simple boolean relation tags used to control the “add entity” submenu. Relations whose rtag is True will appears, other won’t. |
# Adds all subjects of the entry_of relation in the add menu of the ``Blog``
# primary view
uicfg.actionbox_appearsin_addmenu.tag_object_of(('*', 'entry_of', 'Blog'), True)