UmbracoHelper class
The UmbracoHelper
class is designed to provide various helper methods for working with content, media, members, and other components of an Umbraco-powered website. It simplifies common tasks such as retrieving content by ID, rendering field values, and working with media files.
Some examples of uses of UmbracoHelper
include the following list:
- Fetching content and media items by ID or GUID.
- Rendering field values from content items using the property aliases.
- Querying for published content using LINQ-like syntax.
- Working with members for user login and registration.
- Utility functions for URL generation, and so on.
The most common methods in UmbracoHelper
are shown in Table 14.5:
Method | Description |
TypedContent |
Returns an IPublishedContent item based on an ID or GUID. |
TypedMedia |
Returns an IPublishedContent item from the media section. |
RenderTemplate |
Renders a specific template for a given content item. |
GetDictionaryValue | Retrieves values from the dictionary... |