Hello.
I was wondering all the time, why displays should be named only as "page_N", "block_N" or something like that. I thought that it was some limitation caused by this, but it's not, as display IDs are storing as varchar(64).
So, I made a patch which makes this possible. It also adds primary key to views_display table on (vid, id) fields for better storage.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | views_rename_display-D6-3.x.patch | 4.25 KB | neochief |
| views_rename_display-D6-3.x.patch | 4.54 KB | neochief | |
| views_rename_display-D6-2.x.patch | 4.54 KB | neochief |
Comments
Comment #1
seaji commentedSubscribing
Comment #2
wom commentedSubscribing
Comment #3
andypostLooks like a great feature, D7 already have script-generated machine-readable key for nodes, and taxonomy so views display could be named same way.
@neochief As I see you add a primary key. What is a purpose of it? Please comment this on code
This should go into into new hook_update_N()
I'm on crack. Are you, too?
Comment #4
neochief commentedIt safes you from adding duplicate displays_id/vid pairs (yes, patch contains validation too, but just in case primary key should be present too). I'm not sure about positive effect on performance, but at least it should not decrease it.
Moved update to another update function.
Comment #5
a.a.egoroff commentedSubscribing
Comment #6
neochief commentedBumping this up. Can anybody review the latest patch please?
Comment #7
andypostI have no views 6.3 installed so please provide 6.2 patch against drupal-6-2
Comment #8
neochief commentedActually, it's almost the same, try to apply it and I bet you'll succeed.
Comment #9
merlinofchaos commentedI think this will generate a notice.
Typo here =)
I don't see any changes to view.inc -- how does new_id get actually stored to the database?
Comment #10
neochief commentedDo we need to save new_id? I guess no, as it's temporary. Earl, take a look at changes in includes/admin.inc. Display id is being replaced there just before view is saved.
Comment #11
merlinofchaos commentedCommitted to 3.x branch!
Comment #12
neochief commentedThanks!