Hello,
I'm currently ordering entries based on a custom field so that the user has fine control over the order of the entrys on a listing page. I've set the default value to 999.
The ordering is working as expected for newly created entries, and entries where they've gone in and re-published. The problem is that for all the other entries (the ones created before i added this custom field) they are not getting the default walue of 999. In fact they are not getting any value and as such appear first in the listing.
So my ordering currently looks like
1) entries that dont have the default value 999 (old entries that havent been republished individually)
2) entries with custom field value (in order)
3) new entries that have the default value 999.
I thought that a global 'entries' publish would add the default value 999 to the older entries but it isn't . I dont want to have to go through each old entry and manually save them individually for this default value to be stored.
Any help on this guys?
Reported on Movable Type 4.3

Hi Adam,
What don't you check if the entry in context has a value for the custom field and if it doesn't, then set a variable with the value 999 for that entry?
This could be done using this simple approach:
1) set a variable whose value is that Custom Field;
2) if the variable is zero (there is no custom field value), then set it to 999;
3) order by that variable.
You may like to know that there is a plugin called Order, which might be friendlier than the custom field trick.
http://plugins.movabletype.org/order/
Kind Regards,
Mihai Bocsaru
----------------------------------
Daily Movable Type Consultant
Web Development
Movable Type Consulting
Six Apart Partner
http://www.pro-it-service.com/
----------------------------------
Movable Type Demo
http://www.movabletypedemo.org/
Does this mean i need to have nested entries tags?
<mt:Entries sort_by="field:entry_listing_display_order" sort_order="ascend" include_blogs="$blog_id">
<div class="col-304">
<$mt:Include module="Entry Summary"$>
</div>
</mt:Entries>
That is a simplified version of what ive got.
Hi Adam,
Looking at your coding above I realize that what you could do is to set a default value for your custom field (999).
Then you could:
1) either go inside each and every old article manually and just save the entry so that the custom field value is saved for that entry;
2) or you could grab the entry IDs of the entries that are not having a value inside that custom (using <mt:If tag="YourCustomFieldTagHere"><mt:Else><mt:EntryID><mt:If>) and then construct the mysql command to inject database entries for that custom field inside the mt_entry_meta table for those entry IDs with that ordering custom field 999 value).
Kind Regards,
Mihai Bocsaru