This project is read-only.

Change List Placement position

Topics: Customizing Orchard, Troubleshooting, Writing themes
Oct 11, 2011 at 9:47 PM

Is there a way to change to placement position of a list?  I have a list that is currently rendered at the end of a container content item, I would like to have it rendered before other content.  I have tried to use the placement file to change its position but can't seem to figure out what the name of the template is?  I notice that a list is rendered using a Template Method called List, but can't seem to override its placement.  Any ideas?


Oct 11, 2011 at 9:53 PM

List :) It should work. What does your placement look like?

Oct 11, 2011 at 10:00 PM

Ok, thats what I thought, I also tried adding in the full namespace!

Here is my placement file, I'm just trying to hide it first to make sure its being applied...

    <Place Parts_Common_Metadata_Summary="-"/>
    <Place Parts_Common_Metadata="-"/>
    <Place List="-"/>
    <Match ContentType="Course">
        <Place Fields_Contrib_TaxonomyField-Category="-"/>
        <Place Fields_Contrib_TaxonomyField-AudienceType="-"/>
        <Place Fields_Contrib_TaxonomyField-DeliveryMethod="-"/>
        <Match DisplayType="Summary">
            <Place Fields_Contrib_TaxonomyField-Tutor="-"/>
            <Place Fields_Contrib_TaxonomyField-Sponsor="-"/>
            <Place Parts_Common_Body_Summary="-"/>
        <Match DisplayType="Detail">
            <Place Fields_Contrib_TaxonomyField-Location="Content:6.1"/>
            <Place Fields_Contrib_TaxonomyField-Tutor="Content:6.2"/>
            <Place Fields_Contrib_TaxonomyField-Sponsor="Content:6.3"/>
            <Place Fields_Custom_TextAreaField="-"/>
    <Match ContentType="CourseDelivery">
        <Match DisplayType="Summary">
            <Place Fields_Contrib_File="Content:after"/>


Oct 11, 2011 at 10:10 PM

So why are you sending it to "-"? That will suppress it altogether.

Oct 11, 2011 at 10:13 PM

I just want to test that it is matching, once I can see it disappearing I will play around with positioning.

Oct 11, 2011 at 10:54 PM

I'll try it and get back to you.

Oct 11, 2011 at 10:56 PM
Cheers :)

On 11 Oct 2011, at 22:54, "bertrandleroy" <> wrote:

From: bertrandleroy

I'll try it and get back to you.

Oct 13, 2011 at 9:26 PM

We looked with Sébastien and that won't quite work because of the way lists are getting renedered currently. Sébastien can provide more details. Not sure how to work around it yet.

Oct 13, 2011 at 9:56 PM

Ok thanks for getting back to me. I look forward to hearing from Sébastien, I need to figure out a solution as the container contains a body part which takes up a lot of real estate and the content in the list (including price) needs to be rendered higher up the page as its more significant.

Thanks for your time and help.

From: bertrandleroy

We looked with Sébastien and that won't quite work because of the way lists are getting renedered currently. Sébastien can provide more details. Not sure how to work around it yet.

Oct 18, 2011 at 7:54 PM

bump.... Sébastien, any ideas on rendering a list in a different position?

Cheers :)

Nov 16, 2011 at 6:56 PM

A change have been submitted on the 1.x branch so that List are now using Drivers, and should be handled by, using the Parts_Container_Contained key.

Nov 17, 2011 at 7:45 PM


This maybe a little off topic but if we're currently working with version 1.3 and then we implement the changes you've made, I noticed there are new columns being added in Orchard.Core.Containers.Migrations.Create() that were not there before.  If I understand Migrations correctly this will not be called by my existing site and therefore I'm running into errors.

Am I missing something?

Nov 25, 2011 at 12:11 PM

rahulbpatel, you're right, the migration is erroneous. I'll comment on this in where the changes were discussed.

Nov 25, 2011 at 12:32 PM

Actually - forget I said that ;). There's no problem in the migration, I just got mixed up looking at Hg revision logs.

What you'll see is that the Create method runs all the migrations needed, and returns 3 - indicating the database is up to the latest revision.

However for an upgrading user, they will instead get UpdateFrom1() and UpdateFrom2() for an upgrade path to the same latest revision.

It's just so there's only a single install step for a new installation.