oh, yeah! :)
I had to do the same stuff in my bootstrap renderer. I had even more complex case - I had to capture tag to make proper decision about which template to choose and maybe which display option to choose, if developer has set it via attributes.
Funny part is that, tag is available in Render() method, but not in RenderContentAreaItems() anymore - as it's overwitten by display option.
Thanks for this thread/help - I find it very odd the implementation of RenderContentAreaItems overrides the tag with the display option tag.... I'd expect them to be mutually exclusive.
At least it shouldn't be overwritten with the display option's name when the display option doesn't have a tag specified at all.
I guess one could argue which tag should be more exclusive, the attribute or the display option, but my main concern is the above.
Hi,
It seems like the default behavior is to use the display option's name for selecting the template tag or TemplateModel if the tag is not set. This is a problem if we want to pass in a tag to use and an editor has chosen a display option. E.g.:
Will not use "UseThisTag" when selecting template if the editor selects a display option, even though that option doesn't have a tag specified.
Now I've solved this by having my own ContentAreaRenderer and overriding GetContentAreaItemTemplateTag like this:
I find this behavior a bit strange and think the default implementation should be changed.