A feature I consider very useful in category.module is the ability to specify an admin title for a container. I use this extensively, as I've often found myself in the situation of having to name two or more containers with the same title: the admin title enables me to distinguish between them in admin pages. However, when you're creating/editing a node and you want to assign categories to it, the containers are labelled with their titles instead of their admin titles. This is not helpful in the situation I described above.
The behavior I propose is to show the admin title if it's defined, and the title otherwise. The patch I'm attaching does exactly that. Any thoughts on whether others agree this should be committed are welcome.
| Comment | File | Size | Author |
|---|---|---|---|
| category.module_0.patch | 882 bytes | Permanently Undecided |
Comments
Comment #1
Jaza commented-1 to this. Creating nodes that have categories assigned to them is often a task performed by regular users, who have permission to contribute content, but who aren't admins. The admin title should generally only be shown to admins.
More to the point, however, is that the admin title only really needs to be shown where there are multiple containers with the same title being listed in one spot. Why would you assign multiple containers with the same name to the same node type?
Comment #2
Permanently Undecided commentedthe admin title only really needs to be shown where there are multiple containers with the same title being listed in one spot.
This is exactly my situation.
Why would you assign multiple containers with the same name to the same node type?
I don't know if this is of any interest, but my use case is this one: I'm administrating a site for some friends who come from the Movable Type world, where one user is allowed to have multiple blogs, each with a different layout. When I convinced them to switch to Drupal, the only way I could recreate the multiple-blogs-per-user setup was to enable them to create nodes of type 'blog' and to have them choose the blog and blog categories with Category module. Then according to the category I switch layout.
Originally I had created a huge category hierarchy, that covered all blogs and blog categories. This rapidly became unwieldy, because: think 10 blogs, each with 100+ categories. Think a multiple select category box. Scrolling down 1000+ categories to choose the categories to assign to a node was not ideal and made them dissatisfied with Drupal (in Movable Type, they had a different, dedicated area for each blog, so the choice was only among the single blog's categories, which they preferred). So I had to modify the category hierarchy and create a container for each blog. I originally titled the containers 'blog name Categories', but this created menus and breadcrumbs like this: Blog name -> Blog name categories, which they didn't care for. They wanted just Blog name -> Categories. So I switched to using 'Categories' as the container's name, and 'blog name Categories' as admin title. This is where I realized that on node edit pages the container shows up with its real name and not the admin name, and that users would have to actually look at the categories listed to realize what blog that was. I anticipated this would not make them happy and created the patch.
What you say about admin titles showing up for admins only makes a lot of sense; but I think there are use cases where it's handy to take full advantage of the admin title. Feel free to close this issue if you don't see the need, though.
Comment #3
mr.andrey commentedThis is an old thread, but I do have a need for something similar to this as well.
It's useful to have two titles - one for viewing and one for editing.
I have a site with country/state/city category setup, and on the breadcrumb and the title of the country page I want to have "Local posts", but when someone inputs the data, I want it to say "Choose Country".
Andrey.