Clone a display

setvik - December 19, 2008 - 05:44
Project:Views
Version:6.x-2.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

A time-saving feature would be the addition of display-cloning functionality within a view.

#1

rhache - December 30, 2008 - 23:29

+1 from me on this one. While cloning a view is useful, cloning a display would be even better.

#2

asciikewl - January 8, 2009 - 06:36

subscribe

And +1 from me! I love the ability of keeping everything in one view, but some of my displays override quite a bit and re-creating that for new displays is a schlep.

Anton

#3

catch - January 9, 2009 - 01:38

I was thinking this would be a handy thing for a while, but then I decided I should be making separate views instead. If it's easy to do, would be a nice feature though.

#4

merlinofchaos - January 9, 2009 - 02:03

Agreed, this is on my TODO list.

#5

meppy - January 11, 2009 - 10:41

+1 for me here, although if the default view is setup well then it's not a huge problem. A workaround if you have several displays that differ from default in the same way then set the default to match, then override each part you need to, then change the default for the next batch, etc.

#6

Grayside - February 13, 2009 - 18:20

I'd like a default for each display type.

#7

rupl - February 13, 2009 - 20:25

Being able to clone a display would be delightful. In cases where you want to create several similar blocks it would save time and help eliminate human error.

It seems like it would be even harder to implement, but as Grayside mentioned, a default for each display would be even more powerful and flexible.

#8

unrealnighthawk - September 15, 2009 - 22:59

This would be incredibly useful! Please implement this!

#9

dereine - September 16, 2009 - 08:46
Status:active» needs work

Here is an initial patch.

It works perfect if you disable js. But if i have js enabled, its basically doubles the copies, but disables the previous display.

But it needs quite some stuff etc.

AttachmentSize
views-clone.patch 4.43 KB

#10

Murz - September 23, 2009 - 08:16

This is very needed for me too, waiting for working patch.
But maybe not so good to create many displays (with many changes) for one view, better to do different views? What about performance in this variants, which variant is more speedy?
I thing when views loads the view, it loads and analyze all displays for show only one display.

#11

dereine - September 23, 2009 - 09:42

Thats a really good question. I know that views does quite a lot of stuff in unpack_options.

#12

arielon - October 3, 2009 - 05:44

+1. That Merlin has it already on the TODO sounds terrific. :)

#13

tsi - September 30, 2009 - 22:03

Subscribing

#14

planctus - October 12, 2009 - 15:05

Cool...i was looking for this
Go coding merlino... :-)

This is really crucial in multilanguage website making,
since it is not ready yet i'm going to clone the whole views, it will be easier but a little bit silly...
Thanks,
Da.

#15

frankcarey - October 24, 2009 - 00:24

@merlin is there a simpler way to do this in code first? I'd like to get features module to be able to add displays, not just whole views.

#16

merlinofchaos - November 19, 2009 - 04:48

frankcarey: Adding displays could be done via hook_views_default_views_alter() I think, but that will only work if the view is already in code.

#17

antiorario - November 24, 2009 - 09:56

Subscribing

#18

youkho - November 25, 2009 - 14:25

Subscribing

#19

ESC - December 3, 2009 - 18:17

Subscribing

#20

upupax - December 4, 2009 - 13:11

Subscribe

#21

GiorgosK - December 7, 2009 - 13:31

+1 for this feature

@planctus you don't necessarily need to copy a display in order to create the same display per language
have you tried "Node translation: Language > Current user's language, filter"

#22

planctus - December 10, 2009 - 12:14

You're perfectly right... i noticed that after commenting this issue. :-)
Da.

 
 

Drupal is a registered trademark of Dries Buytaert.