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.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?