This project is read-only.

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">
<h1>Header Content</h1>
            <div class="metadata">
            <div class="published">Monday, December 22, 2014 5:53:27 PM</div>
        <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 class="enumeration-field enumeration-field-image-type">
        <span class="name">ImageType:</span>
        <span class="value">Team</span>
<p class="link-field link-field-email">
    <span class="name">Email:</span>
    <span class="value"><a href=""></a></span>
<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 class="link-field link-field-web-site">
    <span class="name">Web Site:</span>
    <span class="value"><a></a></span>
My 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" />
I'm trying to move the Phone custom field higher up in the list and the Bio field down.

Thank for any advice,

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" />
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/ 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/ everything worked.

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