I've tried some of the interesting zone manipulation stuff that Bertrand has spoken about in his blogs and then I extended it a little. We have a part that has a number of fields, but the fields really need to be rendered inside the part. What I've done
is used a specialised alternate for each of them (eg Custom.RelatedItems-Author.cshtml) and rendered the important bits to zones like so:
var zone = WorkContext.Layout.Zones["AuthorName"];
zone = WorkContext.Layout.Zones["AuthorImage"];
Then in the part's template:
To display the fields.
I've overridden the zone templates too with:
IEnumerable<dynamic> children = Model;
foreach (var child in children)
(Strangely @Display(child) didn't work)
My real question follows :)
The AuthorName is fine. It comes out as it should.
The AuthorImage has shape tracing tags around it when I render it in the img src attribute. Or anywhere inside a tag. If I just Author Image: @AuthorImage then I get the URL on it's own, but putting anything around it adds the shape tracing tags. I've spent most of the day looking at how to get rid of them, so I think I'll turn to you now! Where is it coming from?
Any help much appreciated.