As discussed with the management menu (http://drupal.org/node/511258#comment-1865594) and elsewhere, shipping with a core admin theme requires us to think about node submission on the UI. Some node types (forums usually, but many other types on sites) should be submitted with the site theme, while admin-only types (let's say static pages) are submitted with the admin theme (and eventually consequently the overlay).
So I've made the node admin theme setting per content type with a default of 1 (which was our new default installation setting already). Added upgrade path, so that existing sites will get the global setting migrated to the per-type setting.
An interesting side effect is that now node/add is not themed with the admin theme, since we don't know whether the user is about to post an "admin" or a "user" node type. The overlay might need some trickery to still display this in the admin theme if/until the content type selector is not displayed on the node form itself.
Comment | File | Size | Author |
---|---|---|---|
admin-theme-node-type.patch | 9.21 KB | Gábor Hojtsy | |
Comments
Comment #2
joshmillerInteresting solution. Can we make this a multi-valued type so that I could hook into it in contrib and make my own type of content type?
I wonder if the bot is broken or HEAD is broken? Can't hurt to try the bot one more time...
Josh
Comment #3
David_Rothstein CreditAttribution: David_Rothstein commentedI'm not sure if this is a good idea or not. Copying what I wrote at http://drupal.org/node/511258#comment-1873964:
Also, as discussed in that issue, we need to keep in mind how this will interact with things like the (proposed) Create Content block. If there are per-content-type settings for this, it is going to get tricky to figure out what links show in that block and what links don't - and whether you "jump themes" when you click on a link, etc.
All in all, sounds like a fun issue :)
Comment #4
Gábor Hojtsy@David: you'd not only jump themes but also jump to the overlay if you are about to create an admin theme. The D7 concept is to have a clear indication of "where you are" on the site, and having admin UIs both in the admin theme/overlay and outside the admin theme/overlay can be quite confusing IMHO.
I totally agree that it can also be confusing to only have a list of content items on the front end which are about to be submitted on the front end and vice versa only admin content items on the admin UI, so we need to somehow figure out the interaction, but I'd say just determining the overlay/theme by the start of the interaction point is not going to work and going to be more confusing.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedNote that I have a patch at #553944: Define hook_menu_get_item_alter() as a reliable hook that runs before the page is doomed which started off as an attempt to fix a totally unrelated bug, but might be useful for this issue too since it would make granular per-page theming a fair amount easier.
I still sort of like the idea of having it depend on where you clicked from, since I think that is the only solution that would really minimize the "jumping" between the overlay and non-overlay (without restricting which links can appear where).
However, another solution which might be worth thinking about would be to make it depend on a permission. So "regular users" adding content would see it in the main site theme, while "admin users" would see it in the overlay. This would solve the problem of having to have two different lists of content types - each individual user would have consistent behavior for any content creation/editing link they clicked on, so they could all appear in the same list. However, it would also mean that an admin user wouldn't be able to experience content creation via the same screen that a regular user would.
Comment #6
Noyz CreditAttribution: Noyz commentedI like where David is going here. The experience should be uniform across users. Having "add" take on two different interfaces would cause confusion. If you can do this by role, at least the admin will always have the same experience until he logs out.
Comment #7
Gábor HojtsyThis is still a problem. Currently, if you have forum topic creation permissions for regular users, they'll see the Seven theme on the node creation page when submitting forum topics as far as I've seen.
Comment #8
David_Rothstein CreditAttribution: David_Rothstein commentedYes, this is a feature of the node admin theme setting (in D6 too I think?) which makes it not useful for a large number of sites :)
If it comes down to it, we could probably just stop turning that setting on in the standard install profile in D7, since when all is said and done the overlay is going to handle its own theming anyway (it's only different now due to a bug).
See also #669510: Merge administration theme with hook_admin_paths() where there is an effort underway to do something similar to what I mentioned above (i.e. move the entire admin theme in Drupal 7 to be permission-based in addition to page-based), which would solve this problem completely as well.
Comment #9
retester2010 CreditAttribution: retester2010 commentedadmin-theme-node-type.patch queued for re-testing.
Comment #11
chx CreditAttribution: chx at Smartsheet commentedBUMP. As far as I can see this is still a problem. Is the community still interested? This would require
Comment #12
Gábor HojtsyI think this would still be really nice. Not sure of the exact config schema change policy, but I think as long as it is backwards compatible, it should be fine.