Display child items in the widget template of the parent

Use this procedure when you have hierarchical dynamic content types and, instead of using the generated widgets to display the hierarchy, you want to use only the parent widget template.

This allows you to keep your markup on a single place without the need to modify multiple widget templates. For example, you can display the hierarchy Country » City » Hotel using the following widget template:

Eval("Cities") returns all child cities, of the current country, that are visible and with status Live. Using eval methods within city’s repeater give you access to city’s properties - Eval("Name").

Eval("Hotels") – returns all hotels in the current city.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?