This article has not yet been verified against Umbraco 8.

    The concepts and code examples might not work if you are running Umbraco 8.0 or a later version. If you are using Umbraco 7, this article is perfect for you!

    You are more than welcome to report any issues found on the Documentation Issue Tracker.

    DynamicPublishedContent

    DynamicPublishedContent is the dynamic version of IPublishedContent, it allows for simpler access to property data but it does not provide intellisense. All methods and properties that are available on IPublishedContent are also available on DynamicPublishedContent. However, there are a few special methods specifically designed for DynamicPublishedContent that are used for filtering, querying and collections.

    Get started

    To access the current page in your macros or templates, copy-paste the below Razor code.

    @{
        var pageName = CurrentPage.Name;
        var childPages = CurrentPage.Children;
    }
    

    @pageName

    Properties

    Listing and explanation of DynamicPublishedContent properties & standard helpers for Content and Media.

    Collections & Filtering

    Methods for DynamicPublishedContent collections and filtering.

    IsHelpers

    A library of extension methods to simplify working with DynamicPublishedContents in collections to modify your HTML output. Examples could be injecting CSS classes for alternating rows or to modify margins.