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.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. 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?