Search

I've made the update and v1.2 is on Github. Have tested this with 2.0.2 only, so hope this helps!

I had to uninstall and re-install the extension, but now it works great. Thank you, Nick!

thanks, nick. used the latest one on a v2.0.2 install and things seem to be working right

hey nick, not sure if this is the intended use or not, but i noticed that the order number stays at the highest number that it has been incremented to.

the use i'm doing pertains to adding images to a particular entry. Say i add 4 images to an entry and the ordering ends at 4, which ends up being the highest increment to that point. When i create the first image for the next entry, instead of getting the number 1 in the Order field, i get the highest number i have incremented to, which in this case would be 4. is this bug or as designed?

Both by design and a bug :-)

I originally only used the Order field on a section that was not section-linked at all i.e. all entries were relative to each other. However I see the problem — the Order number is shared between all entries in the section, regardless of any filter you apply.

If I'm completely honest, I'm not sure how I'd go about fixing this. I think it would be along the lines of where I calculate the new number, I'll also need to query using the ?filter value to get the next number just within the context of that entry.

can you have multiple Order Entries fields in the same section that they won't effect each other?

Yes. I have a site with Posts, and Images are linked to a post with a Select Box Link. Each entry in Images has an order entries field, so that I can order images per Post. If I view the Images section on its own, obviously re-ordering will affect all images across all posts.

However if I view the Posts publish index and click on the Images column to just show images for this specific post, I can re-order these images within the scope of this post. They won't affect the ordering of images for other posts.

What you outlined above, I think I have down already, but I don't think that was exactly what I was going for, nick.

Let me explain:
Let's take your Posts section, for example. Say I have a separate /posts/ page, and then the homepage. Now, for whatever reason, I make two Order Entries fields on the Posts section - one to control the order of posts when you are on the /posts/ page and the other Order Entries field controls the order of posts seen on the homepage, thus having two different Order Entries.

Would those two Order Entries field live independently of each other even though they are in the same section?

I see what you mean. I think this might work, although I've not tested it. Can you sort our Posts index by the Homepage Order field and re-order them; then sort by the Postpage Order field and re-order them?

They should store two discrete sets of values. When you're ordering by one Order Entries field, it shouldn't update the other. If it does, it's a bug.

I've just tried a test and found that when you have two Order Entries fields in a section, only the first enables the drag-drop re-ordering functionality. If you sort the table by the second Order Entries field, you can't drag them around.

I'll investigate.

wtdtan, I've updated the extension to version 1.3 to add support for multiple Entry Order fields within one section.

http://github.com/nickdunn/order_entries/tree/master

You should be able to add two or more to a section and be able to sort and re-order by each. This will allow you to have separate Home Page Order and Promo Page Order fields :-)

nice, nick! i'll take a look at it, thanks!

hey nick, your update/improvement seems to have broken single order field functionality. I just tried installing v1.3, but i'm now unable to order anything by dragging. When i reverted to v1.2, it worked just fine.

another thing i noticed is that when you change the order number in an entry itself vs. dragging, it doesn't update the other numbers accordingly. but once you drag the entry to another position, it works great.

The single order field functionality was working fine for me. I haven't tried using multiple order fields.

One thing to be aware of: if the field has just been added to a section that has existing entries, do not click on the order field column heading to sort the entries, as these entries will not have a sort value. These entries will disappear and become inaccessible. Make sure to add a sort value.

@wtdtan I've got single order working OK with 1.3.

The point about editing the number in the input field is by design. They may be occasions where you need to manually update the number, which will change its order only. Say you had 10 entries and made one of the order values 99. When you view the Publish list this 99 value will be correctly at the bottom. Upon re-ordering the entries, the new numbers will be recaculated at this last entry assigned the value of 10.

@bauhouse, that's a good point. I suppose I could add some code such that when an Order Entries field is added it will add a default value of 1 for all existing entries. If you do order and lose the entries, appending ?unsort to the end of the URL will sort your list by System Date order.

ok, i'll see if reuploading 1.3 will alleviate the issue.

@nick, instead of needing the ?unsort query, would it be possible to append the "unordered" entries to the end of the ordered ones or vice versa to accomplish the same thing?

Unfortunately not. It's a bi-product of the way Symphony stores its data. When sorting by a field and an entry doesn't have a value for that field, Symphony's SQL joins won't find that entry. The only way around this is to update all existing entries with a value of 0 or 1 when adding the Order Entries field.

I’m using this field for a small section that populates a navigation drop down. There will hardly ever be more than 10 entries in this section and I would love this section to be only ordered manually using your field

@nickdunn: Would it be possible to add an option to the field that sets the section overview to only allow drag and drop reordering and that removes all other reorder links from the table view?

Good suggestion! I’ll have a think about how this could be done.

In the past I’ve hidden the section from the Publish menu to prevent a client re-ordering.

@Nils I have updated Order Entries to allow for this. This latest version (1.5) is compatible only with the integration branch of Symphony from Github since I’m relying on jQuery being included.

http://github.com/nickdunn/order_entries/tree/master

Re-enable the extension. If you’re upgrading from a previous version, you will need to run the query in the README and re-save any section with an Entry Order field.

This release adds a checkbox to the field settings to disable other sorting. If you enable this option and then sort the entries by the Entry Order field, the other column headings will be disabled.

I’ve not tested this extensively, so let me know how you get on :-)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details