A module to recreate the back-end content administration pages where it changes admin/content and adds admin/content/% and admin/content/%/% wildcards for content types and taxonomy terms. This module creates a content admin interface in the form of a menu tree with the use of views and VBO for a dynamic table of content based on the position in the menu tree.

This module effectively brings more of a visual experience that means content authors and administrators can go through a hierarchical menu of data and still know where they are due to the menu's trail. This is focused on mostly more complicated sites with multiple types under a content type.

For instance if a site is being built for product information (Not E-commerce) then there will be a Product content type. Then this has it's direct children in the form of taxonomy terms such as boilers, underfloor heating, wind turbines and spare parts. Then boilers will have biomass boilers, boiler flue systems and combi boilers. Underfloor heating and wind turbines wouldn't have children. Spare parts would then have Filters, feed pipes and so on. From talking to various content administrators in this situation I found what they said most Content Management Systems were lacking was a visual tree where they can click links for each category and sub category to manage content from the back-end as oppose to the obvious solutions out their like taxonomy menu for the front end. You could argue that you can add edit buttons on the front end but the back end needs to provide that easy usability as well.

You can configure which content types to be displayed in the configuration form for the module which is found at admin/config/content/content_admin_tree.

Dependencies for the module are:

Views Bulk Operations
Search API

Similar modules:

Contextual Administration

Context admin serves the purpose of allowing you to create custom content administration pages. It focuses on adding content admin pages to nodes as menu items. Content Admin Tree servers a different purpose as it focuses on the back-end content navigation. Potentially a feature that could be added to this module would be integration with Context Admin.

Images attached.

Sandbox Project:


git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/freshwebpie/1854002.git content_admin_tree
cd content_admin_tree

This module is for Drupal 7

Reviews for other projects:

More Reviews:

Members fund testing for the Drupal project. Drupal Association Learn more


vineet.osscube’s picture

Manual Review:

1) There is no hook_uninstall to remove your custom variables from database like: content_admin_tree_ ..... in content_admin_tree_form.inc.

2) Add .install file to use that hook & use variable_del() to remove custom variables.

tomasbarej’s picture

Status: Needs review » Needs work

Hi fr3shw3b,

Automatic review: There is no code issue according to the coding standards, good work.

Here's few notes and advices:

  • permission for accessing pages admin/content/% should be access content overview instead of access administration pages in your hook_menu definition
  • HTML markup that is used in function content_admin_tree_page should be in separate theme function or template file
  • function _content_admin_tree_output_tax_tree should be rewrited to use theme layer (for example see. Drupal menu_tree function)
  • I don't think that changing title of content overview in backend from Content to Manage Content is good idea for UX experience and to keep Drupal UI consistent
  • I see there a lot of variable and function names that contains abbreviations that doesn't tell anything. At least for the function names I advice to replace that with full terms (like node, taxonomy instead of tax or just term)
fr3shw3b’s picture

Hello tomasbarej,

I'm not fully understanding the second point.
The HTML Markup variables are for prefix and suffix and which markup is used relies on PHP logic.
I could do it in a preprocess function but I don't see the obvious benefit to that.
The markup can be changed easily by altering the prefix and suffix of a menu item.
If this markup was to go into the template file the menu items use then I will need to add the variables
and the PHP logic into the template file for determining what to use.
The Using the theme layer documentation advises not to do this:

I also found this extract about rendering the taxonomy tree using the theme layer:

Every call to theme() returns a string, which usually gets folded into a slightly bigger string, and on and on...

The memory consumption of PHP is influenced by a lot of things. Nested function/method calls do affect memory (each nested call has its own in-scope variable stack), but they are inevitable in all programming languages.

The goal is to limit the depth of the nested function/method calls. Recursive calls can cause the depth to increase dramatically; correspondingly, the memory increases.

The data structures can also cause the memory to increase. Bigger data structure == more memory.

Those 2 reasons are why the renderable arrays are so problematic. They are big, fat arrays that need recursive calls to render() in order to make them into strings.

D6/7’s plain-PHP template files are a performance hit too. Though it’s not immediately obvious why. Alex Bronstein was finally able to shed some light on this subject for me over the weekend. The PHP template files have to be loaded into memory and then re-parsed each time its used. 50 comments on a page? It has to load and re-parse comment.tpl.php 50 times. Stopping in the middle of that step each time to recursively call render() just makes it worse.

So it turns out the D6-style of theme() returning strings into variables isn't where the pain is at all.

I'm still trying to work out how to use the theme layer to build the output string like my method did but I thought i'd
mention it.

The rest of what you said I'm working on, thanks for your advice,
But there's probably something I'm just not getting,
so please enlighten me.


tomasbarej’s picture

I'm sorry that I doesn't came up with a solution for my advices but I understand you that is not so easy to build such a tree and keed it within Drupal theme layer easily overrideable.

fr3shw3b’s picture

Status: Needs work » Needs review

Added hook uninstall and moved the node type and taxonomy tree menu to the theme layer.

fr3shw3b’s picture

Issue summary: View changes

Added more background information to the issue.

esbenvb’s picture

Status: Needs review » Needs work

In the manual review there's very little that catches my eye. Generally good work!

If I should mention a couple of things:

content_admin_tree.module line 109:

The comment here should be something like
Implements hook_form_FORM_ID_alter() for views_exposed_form().

This page explains this: https://drupal.org/node/1354#hookimpl

Also I wonder why you use the triple ='s in the templates like $start === TRUE.

It's not a fault but shouldn't be necessary since it's just true/false checks that could work with stuff like NULL, 1 or 0 as well.

When it comes to the automatic pareview, it shows some trivial code standards issues that should be fixed:

FILE: ...m/content_admin_tree/pareview_temp/includes/content_admin_tree.page.inc
531 | ERROR | Invalid @param data type, expected int but found integer
537 | ERROR | Invalid @param data type, expected int but found integer
540 | ERROR | Invalid @param data type, expected int but found integer
546 | ERROR | Invalid @param data type, expected int but found integer

FILE: ...admin_tree/pareview_temp/templates/content-admin-tree-menu-item.tpl.php
10 | ERROR | File doc comments must be followed by a blank line.

FILE: ...min_tree/pareview_temp/templates/content-admin-tree-views-block.tpl.php
7 | ERROR | File doc comments must be followed by a blank line.

klausi’s picture

manual review:

  1. You should mention the difference to the existing module on your project page. Why can't you integrate your needs into existing project?
  2. content_admin_tree_uninstall(): Doc block is wrong, see http://drupal.org/node/1354#hookimpl
  3. content_admin_tree.install: @file comment lines break too early, see http://drupal.org/node/1354#files
  4. content_admin_tree.module: there is a lot of code duplication for all the insert/update/delete hooks for the entities. Please add a helper function to avoid repeating the ctools cache clear code in many places.
  5. content_admin_tree_title_node_type(): that function does not do anything, why is it needed? Please add a comment. Same for content_admin_tree_title_node_type_taxonomy().
  6. Your page output is vulnerable to XSS exploits. If I enter <script>alert('XSS');</script> as term name I get a nasty javascript popup on that pages. You need to sanitize user provided input before printing, please read http://drupal.org/node/28984 again.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

klausi’s picture

Issue summary: View changes

Added and separated project review links.

fr3shw3b’s picture

Issue tags: -PAReview: security


I have fixed all the areas raised,
In this process I'm learning
lots in terms of what I take for granted to know about and what I actually do and forget.

The reason I have made it it's own project is because I thought the concept was
unique and contains quite a lot of code and processing to be an add-on for an existing

As well as this Context Admin was the only project I could find that is similarly related
but it focuses on using page manager which this module doesn't use, depend or need and
I found it hard to see this module fit in with Context Admin's infrastructure.

I have reviewed three more applications,
The projects have been added to the issue post and are the reviews below:

issue tag PAReview: review bonus added.
issue tag PAReview: security removed.
Sorry, didn't realise you shouldn't remove the security tag, well I know now.

klausi’s picture

Status: Needs work » Needs review
Issue tags: +PAReview: review bonus

Please don't remove the security tag, we keep that for statistics and to show examples of security problems.

klausi’s picture

Now re-adding tag.

klausi’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAReview: review bonus +PAReview: security

Git default branch is not set, see the documentation on setting a default branch.

manual review:

  1. content_admin_tree_uninstall(): doc block is wrong, this should be "Implements hook_uninstall().".
  2. content_admin_tree_title_node_type(): you should only run the user provided part through check_plain(), i.e. $node_type. You should use t() with the appropriate placeholders here anyway instead of check_plain(). Also elsewhere.
  3. "check_plain($term_variables['term_url'])": use check_url() instead, see http://drupalscout.com/knowledge-base/drupal-text-filtering-cheat-sheet-...
  4. content_admin_tree_form(): do not execute any action like cache rebuilding when the form is generated. That code should be in a dedicated submit handler. And never use $form_state['input'], always use $form_state['values'] where possible. Since only a cache is cleared I don't think this qualifies as CSRF vulnerability, but you should fix it anyway.
  5. _content_admin_tree_get_vid(): use taxonomy_vocabulary_machine_name_load() instead.

That are not major blockers, so I think this is RTBC. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

fr3shw3b’s picture

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, fr3shw3b!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Added more reviews