I'm using taxonomy menu and nice menus to generate the page main menu. Not every term has related nodes, but the customer wants them all to be in the menu, but the "empty" terms not clickable. And when he creates nodes related to these terms, the terms should turn in to links. Can I achieve that with hook_page_alter? Or is there a better hook to use. I first tried hook_url_outbound_alter, and I was able to rewrite the path, but it's still a link, and I want to avoid that. I know how to use rendered arrays, but this one is a bit tricky for me.
I would do that using
hook_menu_link_alter() and Special Menu Items module, which provides special menu items like
<nolink > and