Closed (works as designed)
Project:
Views (for Drupal 7)
Version:
6.x-2.1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2008 at 03:32 UTC
Updated:
3 Nov 2008 at 14:30 UTC
If I've given a view the wrong name, or the view has evolved into something else, etc... how can I change its name? I can't see anything in the UI that allows me to change the name.
Comments
Comment #1
green monkey commentedName can be considered a couple of things
1) the Title = just like a page title - but not a URL
2) Path = which is name of the URL you would call up or link to to dis0play data
Note: you have to be in "Page" to view the path option
hope that helps - its new to me too - but WOW! - newest ver is great
Comment #2
green monkey commentedI forgot one
View Name --- for this it is probably best to Cone you view out and give it a new name
(this is the first text you type --- when creating a new view)
Comment #3
Rowanw commentedI changed the name of the view the way you suggested, by cloning it, but since I was just changing the first letter from upper to lower case I had to clone it, delete the original, then clone it again, then delete the first clone. Then I had to add and configure the block again.
I would prefer if Views worked more like content types or nodes where I could have a separate machine-readable and human-readable name, or just the ability to change the view's name like in 1.x.
Comment #4
merlinofchaos commentedThe ability to change a view's name was removed because it is the unique identifier of the view. It is, essentially, the machine readable name, and shouldn't be considered anything else. Changing this name breaks all of the theme functions and other configuration that depends on the name, which turns out to be a lot of things. People who did not understand this in Views 1 would often complain when they change the name of their view and the theming breaks.
In Views 2, this name has become even more important, so changing it is now disallowed. The solution is cloning and recreating, which enforces the understanding that you are creating a new view by doing this, and that you have to update things like block configuration, theme templates, etc.
Comment #5
Rowanw commentedThe fact that changing the name of a view can break so many things is a pretty good reason why relying on the name is not adequate.
It becomes harder to change your website when you can't change the views because their names dictate what they do. It's akin to naming all your CSS classes "bold", "italic", "big", "small", etc... as soon as you change a few styles the class names become 'invalid'.
Blocks, nodes and content types either have an ID or an alternate name, Views is the odd one out. I think the convention used for blocks would work very well for views, the name of the block is labeled as the description and you can reference the block with its ID - I've never had a problem with blocks in this regard.
Comment #6
merlinofchaos commentedThe name of the view is its ID. I'm not sure what part of unique identification you don't understand, but it's really important to a number of Views' capabilities. Blocks don't really have an ID, though they do have a 'module' and 'delta' combination which is effectively its ID. You can't change this, but you can't assign it either. When you create a new block via the UI, one is assigned for you, and that's kind of ugly when you go to theme it.
And don't suggest using the database ID, the whole reason this scheme exists is because Views do not have to be in the database. Modules can provide views in code, and so there simply cannot be database IDs. In Views' case, the view name is a lot like function names (in fact, they follow the same rules).
In fact, using capital letters in your view names is downright silly. It's not what they're intended for. If you want something pretty, that's what the view description is for.
Perhaps the real issue for you is that there isn't actually a 'human readable' name of a View. I never really thought it necessary, though, since it's a completely cosmetic thing.
Comment #7
Rowanw commentedWhat I would really like is a number to reference a view by, rather than a couple of words that may become inaccurate as the view evolves. I honestly wouldn't mind a human-readable name though, as it reminds you to keep the identifier more generic/ambiguous (not for cosmetics). Content.module does it after all, why shouldn't Views?
And if I unknowingly make a typographical error like I mentioned before with the capitalised name, then it's highly inconvenient to clone, delete, clone, delete (since it's case-insensitive) and then reconfigure the block(s).
"When you create a new block via the UI, one is assigned for you, and that's kind of ugly when you go to theme it."
My day job is to theme Drupal websites and I'm telling you it's better for me if I can reference things by a number that doesn't need to change, than by a word that will likely need to change.
I rarely, if ever, have to change the name of a content type, but views on the other hand can do such a wide variety of things and can change significantly based on a single filter (clients who can't make up their minds are usually to blame for these changes).
Comment #8
merlinofchaos commentedThis discussion is like talking to a wall. I already explained this to you and why there isn't a number and there cannot be a number. All I can say is: Keep your names generic and use the description for the human readable part, and leave the view name to be what it is.
I am done with this discussion.