I have a question about taxonomy term system path. I have run this code:
function MYMODULE_menu_alter(&$items) {
unset($items['taxonomy/term/%taxonomy_term']);
unset($items['taxonomy/term/%taxonomy_term/view']);
unset($items['taxonomy/term/%taxonomy_term/feed']); // If you want to hide the feed as well.
}
Now I want to know how to reverse this for the future need. How can I set system paths for all taxonomy terms. Thanks in advance.
edit:
Hi David
In first place I have a problem how to forbid anonymous access to all taxonomy terms (eg. mysite/vocabulary/term). I don't want anonymous user to see this pages. I was searching for answer whole day and I found the alter_menu snippet as the only suitable answer, because for now I don't need terms links from outside world.
So, if I put this script in custom module and run once it clears all system paths for all taxonomy tearms (as it can be seen from admin/URl aliases/list). This is good solution, but I don't think the best one. I need a proof that in the future if I will need this system paths, I can rebuild them. I don't know how to do it!?
I have tried to comment that hook_menu_alter snippet but what next I have to do. I mean, system paths will not be automatically rebuilded. Am I right?
Also, i didn't find suitable module to control access to taxonomy terms from outside for anonymous users. Some modules can control that, but my site is using terms thru views and with that modules views are also invisible for anonymous users (eg. Taxonomy Tools module, access part).