Placement of Custom Fields

Topics: Administration, Core, Customizing Orchard, General, Troubleshooting
Feb 10, 2015 at 3:16 AM
Edited Feb 10, 2015 at 3:20 AM
I'm struggling with the placement of some custom fields in my app using 1.8.1. The resulting html looks like this.
<li class="first team-list-item">
<article class="media-item media-item-summary image">
    <header>
<h1>Header Content</h1>
            <div class="metadata">
            <div class="published">Monday, December 22, 2014 5:53:27 PM</div>
            </div>
    </header>
        <img width="200" height="200" alt="" src="/Media/Default/_Profiles/1338a03e/1a7b09d6/image.jpg?v=635591134514359550">
    <p class="text-field"><span class="name">Bio:</span> <span class="value"></span></p>
    <p class="numeric-field numeric-field-image-order">
        <span class="name">ImageOrder:</span>
        <span class="value">10</span>
    </p>
    <p class="enumeration-field enumeration-field-image-type">
        <span class="name">ImageType:</span>
        <span class="value">Team</span>
    </p>
<p class="link-field link-field-email">
    <span class="name">Email:</span>
    <span class="value"><a href="mailto:somebody@somebody.com">somebody@somebody.com</a></span>
</p>
<p class="link-field link-field-phone">
    <span class="name">Phone:</span>
    <span class="value"><a href="tel:+19999999999">(999) 999-9999</a></span>
</p>
<p class="link-field link-field-web-site">
    <span class="name">Web Site:</span>
    <span class="value"><a></a></span>
</p>
</article>
</li>
My placement.info contains the following.
  <!-- ImagePart -->
  <Match DisplayType="Summary">
        <Place Parts_Image_Summary="Content:1" />
        <!-- neither one of these work
        <Place Fields_Common_Text-Bio="Content:6" />
        <Place Fields_Link-Phone="Content:1" />
        -->
  </Match>
I'm trying to move the Phone custom field higher up in the list and the Bio field down.

Thank for any advice,

Corey
Feb 10, 2015 at 5:40 AM
Try this
   <!-- ImagePart -->
   <Match DisplayType="Summary">
         <Place Parts_Image_Summary="Content:1" />
         <!-- neither one of these work
         <Place Fields_Common_Text__Bio="Content:6" />
         <Place Fields_Link__Phone="Content:1" />
         -->
   </Match>
Feb 10, 2015 at 3:20 PM
This worked! However, I had to correct something else wrong I was doing along the way.

As a shortcut I was modifying the Modules/Orchard.MediaLibrary/Placement.info file. This worked for the "<Place Parts_Image_Summary="Content:1" />" line but not for the Bio and Phone fields.

I am using a theme named PJS.Bootstrap. Once I moved the entire Match to Themes/PJS.Bootstrap/Placement.info everything worked.

Looks like I need to read up on how Placement is handled from the theme inward.

Thanks!

Corey