I have a view that has multiple attachments attached to a page. I need to control the order that the attachments are displayed.

I see that they are simply displayed in the order that the attachment-displays are listed in the view admin. Is there any way to change the order without having to remove and reenter all of my attachments in the correct order?

Comments

merlinofchaos’s picture

Category: support » feature

Unfortunately there currently is no UI to do this. YOu can rearrange them in the database (see views_display, 'position' field controls order). Do be careful that when rearranging you don't mess up the overall order. i.e, there should be a contiguous list of positions with no gaps. i.e, 1, 2, 4, 5 would be unacceptable and probably cause Views to be unhappy.

h3000’s picture

Version: 6.x-2.0-rc3 » 6.x-2.6

Hi,

I upgraded to the latest version of Views but I see no interface for this yet. Will this be a part of future versions of views? It seems to be a very handy interface to have - especially if you have a lot of attachments.

Currently using Views 6.x-2.6
Drupal 6.12

Thanks.

joeebel’s picture

I'd love to see this feature in the future ( a future-feature?), too! I'll try the database jiggering...

jrabeemer’s picture

+++1^9999999

This is a must-have feature. It would seem to me that one should see an "Attachment Order" drag-drop block under the default view if attachments are present.

jrabeemer’s picture

Version: 6.x-2.6 » 6.x-3.x-dev
Component: Documentation » Code

Rebasing feature request...

merlinofchaos’s picture

Patches considered. I know it's a desired feature.

merlinofchaos’s picture

Issue tags: +views worthwhile features

Adding a tag to help find stuff.

kari.nies’s picture

I really need this feature as well.

simon_s’s picture

Chaning the order of views attachments in the views UI would be great and I think many site admins would be very happy about this feature.
At the moment you have to use the panels module to combine different views very flexible. But with dragable views attachments, you could avoid panels in many cases. Would be really happy about this feature!
Thanks for your great work!!!

merlinofchaos’s picture

Status: Active » Closed (duplicate)
joeytheman’s picture

You can export the view and reorder the attachments in the code then re-import the view.

AlanAtLarge’s picture

Subscribe

pippal’s picture

Subscribing

truyenle’s picture

+ Subscribing

Thanks

uufsm’s picture

For displays with many attachments, I borrow a technique from the old Fortran days, when we numbered code lines by 10s. That way, if we realized we needed to add new code, we still had room without renumbering everything.

So, every few attachments I create a "dummy attachment" that's not attached to anything. If I decide later that I want it, I can format it and then attach it. If necessary, I can redo one or two of the other attachments to get things in the right order, but at least I don't have to redo absolutely everything in the view.

griz’s picture

Fortran? In the time you've spent altering attachments I bet you could have written the patch and fixed it for everybody.

FTW:

You can export the view and reorder the attachments in the code then re-import the view.

hockey2112’s picture

#11 is what worked for me!

hagit’s picture

"Reorder displays" in drupal 8

mlncn’s picture

Issue summary: View changes
Issue tags: -

Display order not being used for attachment order is a bug in modern Drupal: #2943293: Views attachments are not rendered in the specified order (seems to consistently use alphabetical by machine name for order, so editing machine names is a workaround)