Hi,
I'm working on a simplified backend for a client, so the people who create the content can easily add and manage the content. As it tuns out, the editors find the default content management page (admin/content/node) too complex.
I would like a different way of approaching the existing nodes. The site is devided in different sections (ie. news, projects, about). I would like to get rid of the filter on admin/content/node and access the nodes based on their place in the site. So, in the administration menu you would see this:
administer
L content management
L news
L projects
L about
When the 'news' menu is chosen, you would see all nodes in the news section.
It would also be an option to access the existing nodes by content type, so the content managmement menu would look similar to the add content menu. My gut feeling says this is easier to realize.
Now I'd like to know: what is the best way to change these admin pages? Can I override module functions just like you'd override theme functions in template.php? Or should I write a custom module?
Thanks,
Marc
Comments
*splutter* of all the things
*splutter* of all the things which really are confusing with Drupal, I really didn't imagine admin/content/node would be one of them!
You can easily write a new module which 'bolts' onto another menu item (even as tabs as well - for an example see imagemenu which 'bolts' onto the admin/menu menu item). Then you can just output a filtered page of the content easily without having to alter any theme files. I'd *always* avoid doing this as it makes upgrading a pain if you've altered files.
...If you do want to alter the node module then perhaps check out the function around line 1552, you could perhaps hijack the function call, eg to test:
You could perhaps then set the filtered type to be the type named in the menu call (eg. admin/content/node/image) you'd then just make a load of new menu items to link to the content types using a dynamic array like this eg:
Note that's just an example, I haven't tested it although I can't see any reason why it wouldn't work... There's no validation either (although you'd need to be admin to use it, so maybe it doesn't matter) - but if it were me I'd check the nodetype exists before doing anything with it.
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
Views
You don't need to write a new module, you can do that with Views.
Nuts! Of course! I forgot
Nuts! Of course! I forgot that you could add admin links using Views... *Very* useful module Views!
Pobster
--------------------------------------------
http://www.justgiving.com/paulmaddern
--------------------------------------------
No tree
A lot of non-tech people have a hard time figuring how the pages are organized. They are used to page trees like in Windows tree view, and they expect to be able to use one in their website too.
If you used taxonomies to organize the pages, you can filter them by "section" (=by taxonomy term). But I know it's not what your are looking for...
The Outline module, which is supposed to become the standard for tree-like views, may bring a new way to handle content in the admin though.
Thanks!
Thank you all for your suggestions.
I didn't realize I can use views to create admin links, I think I'll go and try that first.
I haven't used the outline module before, I'll certainly check it out.
Marc