This project is read-only.

Placement multiple criteria possible or in near future?

Topics: General, Troubleshooting, Writing modules
Nov 3, 2011 at 9:20 AM

Is it possible or will it be possible in the near future to create multiple criteria in a placement Match rule. so something like this:

<Match Path="/home*" or Path="/">


Thanks! This makes sure that the placement stays manageable


Nov 3, 2011 at 4:21 PM

I've made my own version of the Placement system so it can be extended (you can build new Match predicates, and also new alterations in Place values themselves). This will be in my Origami module on a future update, so you could add all kinds of new syntax to placement modularly. Of course, the syntax as you've written it wouldn't be valid XML ;)

Nov 3, 2011 at 7:37 PM

for the moment though, and out of the box, you would need to repeat that section to make an "or". For ands, you can add more than one constraint attribute in the Match tag, or nest them.

Nov 7, 2011 at 1:07 PM

hi , i would want to specify the place where my content part shuld appear in the display of my content item? Actually i want two ContentParts that i have attached to be on a single me out.Hope it wud be enough if i could make the chges in my file?Thanks !!!

Nov 7, 2011 at 1:20 PM

Placement determines which zones the parts appear in, and where they are placed in that zone.

The zones are configured in Content.cshtml.

You can't combine two separate parts like that using placement. The are two different ways you could approach this:

1.) Create a new zone in an override of Content.cshtml; style members of that zone with float:left so the parts stack horizontally

2.) Create a new shape that combines properties of the two parts. You can do this by writing your own driver, and then create a new view model to pass in as the shape's model

Nov 8, 2011 at 5:10 AM
Edited Nov 8, 2011 at 6:11 AM

yeah!Guess the first one would be easier,u mean to say i got to create a Content.cshtml in my contentitem , to design the template for displaying its contentParts right,for overriding the one in Orchard.core Views?......Any links on that wud be even more helpful.....( am just a beginner)......If at all how shd i go about creating a template file???:((