Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By webspring on
drupal v: 6.17
ubercart 2.0
various other modules that should have no bearing on the content list.
I have been trying to simply add a new column to the content list/table. I have been trying with 'node_admin_nodes' and various other functions to alter the form.
The closest i can get to is show the table with the new column but the search filters have disappeared and the original content list/table shows below. So there are two content lists.
If anyone could point me in the right direction or help out it would be most appreciated.
Comments
An alternative approach is to
An alternative approach is to use views and views bulk operations to create a view/page that meets your needs.
Thanks for the reply. I would
Thanks for the reply.
I would rather not go in the direction of views for this one. It seems like this should be a simple thing to do, just add a column to the admin content list?
Would anyone have another insight?
The default admin page is not
The default admin page is not designed to be extensible, which is why I suggested views.
That is a shame. But i was
That is a shame. But i was very close with my solution. I had the new column showing in a working content list, the only problem was that the original content filters had disappeared. I guess i will have to do some messing around with the filter functions/hooks.
Any pointers about the filters at all?
You can add a column by
You can add a column by overriding the theme for the page. I can't remember what the specific theme function is though. It may be theme_node_filter_form().
is there a solution here?
I wanted to o this do so i could add a node reference column.
I have a bunch of locations with auto title linked to centers, it would be nice to have a column that shows URL referrals so i know what the locations are linked to.
You can add a column by
You can override the theme function for the page and add your column there.
i dont know where to begin.
I am not sure i quite know where to start with this but i may have to look into this, and ill search for some views that rebuild the admin management, but i dont really want to rebuild the drupal content management part of the site in views seems like that is counter to using a content management system... but what do i know.
I think that the
I think that the miscommunication here is that this thread is in the module development section of the forum, and you are looking for a module to do what you want. I'm telling you how to do it in a module, but that's not what you are looking for.
ah i see i need to build the module.
ah i see i need to build the module, thanks for clearing up the muddy ness a little.
If i make something awesome ill share it here.
Might help . . .
I cribbed some code from the "Weight" module to make something similar work. It doesn't actually add a new column to the table, but appends some data to an existing column (the "status" column in this case, though Weight uses "operations"). This just shows the date/time of the last update to each node:
http://drupal.org/node/141790
http://drupal.org/node/1417904
worked for me
This is a great idea. Way to attack this with a different approach. I wrapped mine in a
span
tag I can make the text smaller. Thank you, noah{referring to the post two above me}
Hakuna Matata
VBO a great alternative
Views Bulk Operations module creates a new view called "admin_content" that works excellent for adding a column, and having it be sortable.
get VBO module
then navigate to your list of views at
admin/build/views
find "admin_content"
If you edit the view and change the Path (under the Page display) from
admin/content/node2
toadmin/content/node
it'll override Drupal's content list.With only minor tweaking, this was the perfect replacement. This saved the day for me
Hakuna Matata
There is a module for that
Extra columns (https://www.drupal.org/project/extra_columns) would fit your need, I think. You can choose which column you want to add from a list of all your fields in all your content types.
See the issue list for a minor glitch and its manual fix.