The scenario is that I have many FieldRenderers. They should output data from different places, some of the elements of X and others from the element of Y. And they should output properties from the element of Z.
Assuming I have a public ItemX property from which I want to infer the property, any of the following will be OK. But I do not get any of them:
<sc:FieldRenderer runat="server" FieldName="Logo" DataSource="<%# ItemX %>" /> <sc:FieldRenderer runat="server" FieldName="Logo" DataSource="<%= ItemX.Paths.FullPath %>" /> <sc:FieldRenderer runat="server" FieldName="Logo" Item="<%# ItemX %>" /> <sc:FieldRenderer runat="server" FieldName="Logo" Item-ID="<%# ItemX.ID %>" /> <sc:FieldRenderer runat="server" FieldName="Logo" Item-ID-Guid="<%# ItemX.ID.Guid %>" />
If I add the MyFieldRenderer identifier to it and make the ugly figure below, I get the correct output:
MyFieldRenderer.Item = ItemX;
Should there be a better way to do this? I'm not sure if this is a Sitecore or WebForms issue.
source share