Provide a Context
Providing a Context enables distant code to communicate with it, ideal way to incorporate central logic.
Last updated
Was this helpful?
Providing a Context enables distant code to communicate with it, ideal way to incorporate central logic.
Last updated
Was this helpful?
The recommended approach is to base your Context API on the UmbContextBase
class, which provides automatic context registration. The following example shows how it's used:
For a practical implementation example, see the article.
You can provide a Context API from any Umbraco Element or Umbraco Controller:
Or provide it from a Controller using a host
reference to the Controller Host (Umbraco Element/Controller):