Open orchardbot opened 12 years ago
@bleroy commented:
There is a workaround, which is to use two non-nested matches with both criteria on.
Znowman commented:
The following is indeed a workarround but it's still a bug. It quiet confusing and I think esspecially when you are new with Orchard.
<Match ContentType="BlogPost" displayType="SummarySmall">
<Place Parts_Title="Content:1;Alternate=BlogPostSummarySmallTitle"/>
<Place Parts_Common_Body="-"/>
<Place Parts_Common_Body_Summary="Content:2;Alternate=Parts_Common_Body_Summary-BlogPost"/>
</Match>
<Match ContentType="BlogPost" displayType="Detail">
<Place Parts_Title="Content:1"/>
<Place Parts_Common_Body="Content:2"/>
<Place Parts_Common_Body_Summary="-" />
</Match>
<Match ContentType="BlogPost" displayType="Summary">
<Place Parts_Common_Body_Summary="Content:2;Alternate=Parts_Common_Body_Summary-BlogPost"/>
<Place Parts_Common_Body="-"/>
<Place Parts_Title="-"/>
</Match>
Znowman commented:
well after some examination the workaround doesn't work for all cases. So I think this is quiet critical because it's such a basic feature of orchard.
AimOrchard commented:
So the bug is that you cannot nest multiple DisplayType matches inside a ContentType match in general or..?
Znowman commented:
Ok this is really strange. The next day if suddenly works without any changes to the code. Maybe some temp file has updated finally or something? How can i trigger this? Can I delete a file so that the placement info is updated?
Znowman commented:
Oops no I look a the wrong page. The problem is still there! I do nothing special. I have a recent blog post widget and a news page which show summary items of blogpost. The problem exists when you open a blog post in detail displaytype mode. Then there's no way i can show the title and the body is only in summary mode.
<Match ContentType="BlogPost" displayType="Detail">
<Place Parts_Title="Content:1"/>
<Place Parts_Common_Body="Content:2"/>
<Place Parts_Common_Body_Summary="-" />
<Place Parts_Blogs_Blog_Description="Content:2"/>
</Match>
<Match ContentType="BlogPost" displayType="Summary">
<Place Parts_Common_Body_Summary="Content:2;Alternate=Parts_Common_Body_Summary-BlogPost"/>
<Place Parts_Common_Body="-"/>
<Place Parts_Title="-"/>
</Match>
Znowman commented:
I have used the path (path="/news" etc.) criteria as a workaround but that's very nasty because i have to copy each match tag for each culture specific path. You will see the problem when you view the details page of a blog item and a recent blog posts widget placed on the right. It is overriding each others placement.
Znowman created: https://orchard.codeplex.com/workitem/18584
I have a blog and a blogpost with the following placement:
The strange thing is that in DisplayType Detail the rules of SummarySmall are picked also. Is this a known bug of placement (using orchard 1.4) that it's mixing up the placement of different displaytypes?