field placement issues on admin side?

Topics: General
Mar 16, 2012 at 1:49 AM

Hi all, I have a placement file that works fine in ordering my fields of a content type on the frontend [though I think this is due to the way in which the fields were ordered when created], though appears to be ordered by field type’s on the admin/create side, ignoring my placement file? I’ve seen this question pop-up before in trying to find a solution, though thus far, I *think* one hasn’t arisen?

This is my placement file:

 

    <Match ContentType="Project">
      <Match DisplayType="DetailAdmin">
        <Place Fields_Contrib_Image-IntroPic="Content:1"/>
        <Place Fields_Common_Text-History="Content:2"/>
        <Place Fields_Contrib_Image-HistoryPic="Content:3"/>
        <!--ACTION-->
        <Place Fields_Common_Text-Action="Content:4"/>
        <Place Fields_Contrib_Image-ActionPic="Content:5"/>
        <Place Fields_Common_Text-ActionAlt2="Content:6"/>
Etc..
      </Match>
    </Match>

Thanks for your thoughts, pg

 

Mar 16, 2012 at 6:18 AM

Ok, scrap that, it appears neither is working properly: basicallly, the image fields are always on top no matter what the order, which lead me to this:

http://orchard.codeplex.com/discussions/283543

So upon investigating 'GetDifferentiator', it already existed? Any other ideas, thanks for your thoughts, pg

Mar 16, 2012 at 9:29 PM
Edited Mar 16, 2012 at 9:30 PM

Are these placements inside your front-end theme? They will need to be placed into the admin theme's placements to affect the admin-side editor. It is possible to override the Admin theme with your own if you want to do that.

Mar 16, 2012 at 10:13 PM
Edited Mar 16, 2012 at 10:18 PM

Thanks for the reply CPyle, I have the placement file located in a custom module, and so far, anything that isn’t an ‘image field’ is able to be organized appropriately on front-end and back-end; the usual incorrect behaviour being, the image fields are always on top no matter what? I got excited when reading that linked post in my second reply, as that was exactly the behaviour I was getting; but sadly, either I’m not understanding the GetDifferentiator or it is another quirk?  Going slightly crazy...so any thoughts are welcomed, pg

PS> I will try placing it in differing locations as suggested, cheers

Mar 16, 2012 at 10:28 PM

THANK YOU CPyle!  Placing it in my theme folder corrected it [...kind of obvious I suppose], but when all other fields were being overridden correctly from my module, I erroneously assumed it was something wrong with the image field *cringe*. Thanks again mate, very much appreciated!

Mar 16, 2012 at 11:45 PM

I also noticed that you aren't using specifying the editor shapes for the fields.

If you look into the Contrib.ImageField Placements.info, there is an entry for

<Place Fields_Contrib_Image_Edit="Content:2.5"/>

Try placing differentiated versions of this shape in your module, you shouldn't even have to match a specific display type.

I'd be interested in seeing if that works from your module as I've never tried it.

Mar 17, 2012 at 12:27 AM

Interesting, placing the _edit variety in the themes folder works as expected, but the exact same code in my module does not. It behaves as it did previously except the first text field appeared above the first image field – this did not occur the first time, as all image fields were on top, no matter what originally. Perhaps I should have tried with “DetailAmin” displaytype [not sure if that’s correct or if there is a specific “Edit” type?]. Hope this helps your pondering, thanks for all your help CPyle