Git clone path:
git clone --branch 7.x-1.x smiletrl@git.drupal.org:project/term_menus.git

Drupal version: 7

Description:
This module is to build menus based on connections between terms and nodes. See
term menus block

The idea comes from the common request of terms -- nodes menus in Drupal community, like menu:
-- term1
-- node/1
-- node/23
-- term2
-- node/5
-- term3
-- node/15
-- node/20
-- term8

In simple words, it builds term menus, i.e., menus based on connection between terms and nodes. After installation, admin goes to taxonomy field's editing page, like "admin/structure/types/manage/article/fields/field_test_term", there will be "TERM MENUS SETTING", enable it and you will get a term menu based on this taxonomy field. There're options that you can synchronize nodes and terms to this field's term menu.

Similar module:

Term_menus kind of takes taxonomy_menu module into the next level. Taxonomy_menu creates menus based on terms inside vocabulary. Term_menu builds the terms, also the nodes associated with terms with taxonomy field.

Features:

  • Menus based on taxonomy field, connecting term hierarchy and nodes.
  • Custom term pages for term menu.
  • Custom page could include child terms' nodes. As opposed to default term page, it doesn't.
  • Token and pathauto/url_alias support for custom term page.
  • Support one node for multiple terms inside one term menu.

TODO list:

  • Perhaps make it work with i18n/locale module.
  • .. other potential issues.

Short list:
To simplify this module, it only supports one parent term for terms now. So if one term have many parent terms inside vocabulary, it will only count the first parent term.

It's difficult to add multiple parents support here. Anyway, if there's big request for multiple parent terms, this feature could be in future todo list:)

Credits:
This module has taken some great idea from Taxonomy_menu module https://drupal.org/project/taxonomy_menu and Drupal core taxonomy module.

Project page:
https://drupal.org/sandbox/smiletrl/2027003

CommentFileSizeAuthor
#3 term_menu_block.jpg10.68 KBsmiletrl

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://ventral.org/pareview/httpgitdrupalorgsandboxsmiletrl2027003git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

smiletrl’s picture

Issue summary: View changes

update something I have cleaned in code.

smiletrl’s picture

Status: Needs work » Needs review

Code cleaned. Please review:)

smiletrl’s picture

StatusFileSize
new10.68 KB

Add a picture to show what this module does.
term menus block

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Add picture

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

Cristobal Wetzig’s picture

Nice code! It's nice code. But overall the module has spellingmisstakes and some grammar that should be looked at. Fixing those will make it great imo.

Examples of grammar and spelling

Spelling errors in readme:

  1. Install this module as usual way for mmost Drupal modules.
  2. it doesn't inlcude child

Spelling errors in module

  • "his is a lightwieght function t" in module line 910
  • Grammar in this text should be looked at "This list shows all term menus in site.
    There're no term menus enabled in site now. You may enable term menu for taxonomy field at taxonomy field's editing page, e.g., admin/structure/types/manage/article/fields/field_test_term". Should be something likeThere's no term menus enabled in this site now. ...

term_menu hook

This should describe what the link does for the user. Not what the module use it for.

'description' => 'Provide a central place to see term meu list.', should perhaps be "Administration of menu term lists"

Field settings

The grammar makes the settings confusing. examples:

  • "Whether terms inside this term menu uses custom term menu page"
  • "Whether synchronize term menu when a node is updated."
  • "Whether synchronize term menu when term(s) get updated".
Cristobal Wetzig’s picture

Status: Needs review » Needs work

Changed status

Cristobal Wetzig’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Status: Needs work » Needs review

Thanks for your review @Cristobal!

This module is updated, added new features. Thanks for anyone's review!

Cristobal Wetzig’s picture

Hi again!

There are a number of variables that has been left from development that seems to me are not being used:

//term_menus_field_menu_validate()
$field_name = $form['#field']['field_name'];
  $field = $form['#field'];
//term_menus_tokens() 
$sanitize = !empty($options['sanitize']);//never used?
//term_menus_insert_term_path_alias()
//term_menus_insert_term_path_alias()
//Alias is never used
$alias = pathauto_create_alias('term_menus', 'update', $source, $data, $term_menu->field_name);
//term_menus_taxonomy_vocabulary_delete()
  $menu['menu_name'] = $term_menu->menu_name;//this line?
    _term_menus_delete_menu($term_menu);
Cristobal Wetzig’s picture

Status: Needs review » Needs work
Cristobal Wetzig’s picture

 * Implements hook_node_insert().
 *
 * Add this node into term menu, if condition is met.
 */
function term_menus_node_insert($node) {
  _term_menu_insert_node_link($node);// this function does not exist!
}
Cristobal Wetzig’s picture

Issue summary: View changes

Updated issue summary.

smiletrl’s picture

Status: Needs work » Needs review

Hi Cristobal, thanks for your review!

Updated this module. As for

//term_menus_tokens() 
$sanitize = !empty($options['sanitize']);//never used?

This code exists here for future locale support only:)

As I have promoted this sandbox to project, any reviews are appreciated! Thanks.

klausi’s picture

Status: Needs review » Closed (duplicate)
Already Approved
It appears that you have successfully completed the application process with a different application, and been granted the 'create full projects' permission:

Project: https://drupal.org/node/1800798

Once their first application has been successfully approved, then an applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue.

With this in mind, I have marked your application as 'closed(duplicate)'. If this is incorrect, and you do not yet have the ability to create full projects, then please feel free to re-open this application.

klausi’s picture

Issue summary: View changes

Updated issue summary.

avpaderno’s picture

Title: Term menus » [D7] Term menus
Related issues: +#1800798: Domain Ip