Hi
In my course system i have added a cck field to all the content types which can be accessed by only few members of the course. Also my course system is open, so it can be accessed by anonymous users as well.
So the cck field differentiates whether the node should be available to all users or anonymous.

So in my navigation system [Table of Content], I have to set different colors for nodes depending upon the value in cck field.
I have checked in elms_content module that the block uses menu_tree_all_data() function of menu.inc.
But altering this function doesnt seems an option to me as it appears to be one of the core function of drupal. So is there any other way i can set color to navigation system nodes?

Tks in advance
-Vil

Comments

btopro’s picture

Status: Active » Needs review

Hmm.. I think what you'll want to do is look at how the hidden_nodes module works. It's able to render the menu hierarchy / book hierarchy and only append the "hidden_content" class to links to nodes that have been marked hidden. While that module has permission implications, this one aspect (add a class based on criteria) could be exactly what your looking for. This could also be added as another module that just alters in this behavior instead of changing any of the code in elms to do it :). Let me know how it goes, I'd love to see your ELMS instance when you get it into production. http://drupal.org/project/hidden_nodes

Grayside’s picture

Fyi, this sounds like a good use of the D7 hook_menu_get_item_alter(). Or possibly a theme override.

invincible1388’s picture

Tks for the heads up. Got it working by using hook_menu_link_alter() ,the same hidden_node module is using.

Tks,
-VIL