Items in primary navigation that are linked to admin content does not display to anonymous users.

I have a link called "Your machines" that is linked to localhost/node/add/products and i have given anonymous user permissions to see it with the menu_per_role module but they are stil unable to see the link?

Comments

AlexisWilke’s picture

Drupal Core has the first level and knows whether a page is accessible or not. Menu Per Role can hide menu items that are still visible after that process, it cannot show links that point to forbidden pages.

The page is not accessible to your anonymous users at this point. What you need to do are two things:

1) Make sure that the page includes the default Filter format

2) Make sure that anonymous users have the permission "Create new products"

That should be under admin/user/permissions

UNarmed’s picture

Hey thanks for the help.

The only problem is i am sending unauthenticated to a register/login page when they click the link and then to the create content section so i cant simply give them "create new product". I ended up just adding the link to the page.tpl.php by printing the base_url in a link and adding /node/add/products to it. Not the greatest solution but it gets the job done i suppose.

AlexisWilke’s picture

You could just have had a block and the code written "by hand" there. 8-)

<a href="/node/add/products">Add product<a>

And that would not get removed by the system.

It could be also that you could add an "external" link in your menu. That would be a link including http:// so it is not tested by the system to know whether it is accessible or not.

Thank you.
Alexis

AlexisWilke’s picture

Status: Active » Fixed

Another way I have done it... is to add a link with something like this:

user/login?destination=node/add/products

And that link get hidden from the logged in users. It won't really work if the person registers though.

The node/add/products link is left alone as the system will display it as required.

I'll mark this as fixed for now.

Thank you.
Alexis

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.