I have a Projection Widget that displays a content type in the AsideSecond zone. I used Placement.info to suppress most of the metadata.
On the main page for that content type I want all the metadata displayed in the Content zone.
I cannot seem to work out how to specify an alternate template based on where the Shape is being rendered. They both have a display type of Summary. Everything I attempt applies the suppression/alternate template to both.
As these are threads which will be added as the forum is used I cannot use the ID alternate as a viable option.
My relevant placement:
<Match ContentType="Thread">
<Match DisplayType="Summary">
<Place Parts_Common_Metadata_Summary="-"/>
<Place Parts_Threads_Thread_ThreadReplyCount="-"/>
<Place Forum_Metadata_First="-"/>
</Match>
</Match>
I have tried nesting the Place
elements under a <Match ContentType="Widget">
element, but to no avail.
Is this even possible?
Update: I created a Shape layout on the query used in the projection widget. I created my own list shape in the theme Views folder and can access the relevant properties I need with a bit of casting. So, I can work around my issue.
I would still like to know if it is possible to set an alternate based on the zone or whether the content is rendered in a widget. I have seen several, mostly unanswered, questions on SO regarding this (e.g. How to suppress parts in Orchard based on zone)
My question was answered on the Orchard discussion forum.
So it is not a simple alternate naming or placement solution. I feel the best plan of action is to write ones own layout for a query if you are attempting to use the same ContentType and DisplayType across zones. Hope this helps someone.