Context Apps
Configuring context apps in Umbraco UI Builder.
Last updated
Was this helpful?
Configuring context apps in Umbraco UI Builder.
Last updated
Was this helpful?
Context Apps in Umbraco UI Builder function similarly to Workspace Views (previously called as Content Apps). They provide contextual applications within the content editor UI. By defining context apps, you can expose collections that are directly related to the content in question. For example, blog post comments can be linked to their respective blog posts and managed in context through a Workspace View.
AddContextApp()
MethodAdds a context app with the specified name and default icon.
AddContextApp()
Method with Custom IconAdds a context app with the specified name and custom icon.
AddContextAppBefore()
MethodAdds a context app with the specified name and default icon before another context app specified by its alias.
AddContextAppBefore()
Method with a Custom IconAdds a context app with the specified name and custom icon before another context app specified by its alias.
AddContextAppAfter()
MethodAdds a context app with the specified name and default icon after another context app specified by its alias.
AddContextAppAfter()
Method with a Custom IconAdds a context app with the specified name and custom icon after another context app specified by its alias.
SetAlias()
MethodSets the alias of the context app. By default, an alias is automatically generated from the context app's name. You can use the SetAlias
method to specify a custom alias.
SetIconColor()
MethodSets the context app icon color to the given color. The available colors are: black
, green
, yellow
, orange
, blue
or red
.
Context app visibility is controlled by a delegate that takes a ContextAppVisibilityContext
instance. This method contains a Source
property which holds a reference to the source object that the Workspace View is being displayed on (i.e., an IContent
instance). It also holds a reference to a UserGroups
collection of the currently logged-in user's user groups. You can use these values to determine when the context app should be displayed.
By default, context apps are pre-filtered to only appear on the tree they are defined in. This default behavior is combined with the SetVisibility configuration to control visibility.
SetIconColor()
MethodDefines the visibility of the context app based on a delegate expression.
Context apps can consist of one or more collections. If a context app contains multiple collections, the collection list views will be displayed in tabs within the context app.
AddCollection<>()
MethodAddCollection<>()
Method with Custom IconAddCollection<TEntityType>(Lambda idFieldExpression, Lambda fkFieldExpression, string nameSingular, string namePlural, string description, string iconSingular, string iconPlural, Lambda collectionConfig = null) : ContextAppConfigBuilder
You can define a context app by calling one of the AddContextApp
methods on a instance.
Adds a collection to the current context app with the specified names, descriptions, and default icons. Each collection requires an ID field and a foreign key field, linking to Umbraco node UDI values. For more details, see the article.
Adds a collection to the current context app with the specified names, descriptions, and custom icons. Each collection requires an ID field and a foreign key field, linking to Umbraco node UDI values. For more details, see the article.