0
votes

I've successfully followed the Sitefinity documentation about how to use an external widget template file and now I would like to use a repeater in the external widget template file to display the child items as described in the Sitefinity documentation about how to display child items in the widget template

Moving this to a external widget template file fails on the Repeater attribute DataSource as it is not a valid attribute.

I know how I would approach iterating the child items

IQueryable<DynamicContent> childItems = parentItem.GetValue("ChildItems") as IQueryable<DynamicContent>;

But I am unsure how I would get the selected parent on PageLoad. Any suggestions?

1

1 Answers

0
votes

It's hard to be very precise with the limited example you gave. But if you get this this template from a listing of stab mic content you could grab the last part of the URL which is the urlname of the dynamic item and use The manager to look it up the. Get the children. Or if your widget has a Guid property use thunder to create a Designer to selected the parent item to display.