Hi! Thanks for the great module, it is very time saving.

I've to report one small issue: the "switch type" selector shouldn't be displayed in the following paths because it doesn't work (and it doesn't have much sense):

  • admin/content/types
  • admin/content/types/add
  • admin/content/types/fields
  • admin/content/types/export
  • admin/content/types/import

Many thanks again.

CommentFileSizeAuthor
#4 display_only_needed.patch744 bytesfinex

Comments

finex’s picture

It should be enough to modify the line 19 adding some extra tests:

if ($arg[0] == 'admin' && $arg[1] == 'content' && in_array($arg[2], array('types', 'node-type')) && !empty($arg[3]) && $arg[3] != "add" && $arg[3] != "fields" && $arg[3] != "export" && $arg[3] != "import") {
finex’s picture

P.S: on the initial report I've done a small mistake: "admin/content/types" is already managed.

markus_petrux’s picture

Category: bug » feature
Status: Active » Needs work

Ok, let's enhance this. A patch is welcome as I do not have much time. Once a patch is posted and reviewed by others, I would be glad to get it in. Thanks!

finex’s picture

Status: Needs work » Needs review
StatusFileSize
new744 bytes

Ok, here is the patch :-)

--- content_type_selector.module	2009-06-30 21:55:29.000000000 +0200
+++ content_type_selector.module.new	2010-06-28 17:34:28.000000000 +0200
@@ -12,7 +12,7 @@
  */
 function content_type_selector_help($path, $arg) {
   // Find administration pages for a particular content type.
-  if ($arg[0] == 'admin' && $arg[1] == 'content' && in_array($arg[2], array('types', 'node-type')) && !empty($arg[3])) {
+  if ($arg[0] == 'admin' && $arg[1] == 'content' && in_array($arg[2], array('types', 'node-type')) && !empty($arg[3]) && $arg[3] != "add" && $arg[3] != "fields" && $arg[3] != "export" && $arg[3] != "import") {
     // Obtain the current content type and prepare the mask for the new urls.
     $current = $arg[3];
     $arg[3] = 'NODETYPE';