Last updated
Was this helpful?
Last updated
Was this helpful?
All collections of IPublishedContent
are IEnumerable<IPublishedContent>
. This means that all C# LINQ statements can be used to filter and query the collections.
Returns a collection of child items available in the current culture, below the current content item.
Returns a collection of child items for all cultures, below the current content item, regardless of whether they are available for the current culture.
Returns a collection of child items available in the specified culture with a default of the current one, below the current content item.
Returns all ancestors of the current page (parent page, grandparent and so on)
Returns the first ancestor of the current page
Returns a collection of all ancestors of the current page (parent page, grandparent and so on), and the current page itself
Returns all descendants of the current page (children, grandchildren etc)
Returns all descendants of the current page (children, grandchildren etc), and the current page itself
Filters a collection of content by content type alias
Filtering and Ordering are done with LINQ.
Some examples:
Groups collection by content type alias
Return only the number of items for a collection specified by the integer value.
Return items from the collection after skipping the specified number of items.
Returns the number of items in the collection
Returns a boolean True/False value determined by whether there are any items in the collection
If you create a checkbox property on a document type with an alias umbracoNaviHide
then the value of this property is used by the IsVisible()
extension method when filtering.
Use case: When displaying a navigation menu for a section of the site, following this convention gives editors the option to 'hide' certain pages from appearing in the section navigation. (hence the unusual umbracoNaviHide property alias!)
Some filtering and routing behaviour is dependent upon a set of special naming conventions for certain properties.