By KSA213755 on
I'm using the front page module with the bluemarine theme and have anonymous users blocked from accessing content. However, when I view the front page as an anonymous user the Edit primary links hyperlink is displayed. What do I have to do to remove that from the front page for anonymous viewers? www.kpsinfo.com is the site if you want to see what I'm referring to. Thanks.
Roger
Comments
You either need to edit the
You either need to edit the theme css or the page template... I can't remember which one at the moment, sorry.
No need to mess with the template ...
"Edit primary links" is only displaying because you have not entered any primary links.
If you don't plan to add any primary links, you can disable the menu by going to administer >> menus (under Drupal 4.7). On versions before 4.7, you can disable the message by going to administer >> themes >> configure and unchecking the "show primary links" box.
If you DO plan to add primary links at a later time, you can always add them and re-enable the menu. As long as at least one primary link is entered, no one will get the "Edit primary links" message.
If you want to add primary links but hide them from anonymous users, then and only then will you need to edit your template files.
Gary
I do have primary links created
I created some primary links, but they only display for logged on users. They also display when viewing the front page as anonymous visitor, but only if I have admin > access control > node access content enabled. Seems strange that the "edit primary links" is tied to the access control, but it seems to be.
Roger
Sounds like a bug ...
You might want to submit a bug report about that behavior. Something's definitely not working correctly.
And then do what???
I am having the same problem.. using Drupal 4.7 (Safari 2.0.3 on Mac OS X if relevant)
I go to administer >> menus but THEN WHAT?
There are three tabs "list", "add menu" and "add menu item" of which "list" is currently open.
The list has a long list of menu items, none of which mention the word "link" or "primary link"...
AHA.. I just discovered that if I click on the word "menus" rather than the word "edit" then I get something mentioning primary links and can follow my nose from there.. either turning it off or not.
Well, that solved that one..
BUT it has raised several more questions for me:
- what is the difference between clicking on an item in the list (eg "menus") and clicking on the word "Edit" next to it?
- why does the default link "Edit Primary Links" not take one to the actual page that deals with primary links rather than to the general menu system?
Cheers
gordon
adminster---themes---configure
you can log in to adminter click on themes in that click on configure and then disable in toggle display primary and secondary links
The links administration was moved
In 4.7 the links admin was moved to Administer > Menus. The toggle check boxes that used to reside in the themes admin no longer exist.
Roger
I couldn't get rid of it either
I even deleted the menu item but the link still showed up.
I had to edit page.tpl.php to get rid of it.
I had the same problem and
I had the same problem and this is what I did.
clicked the "edit primary link", brought me to admin > menu. I clicked "disable" to the right of menu. I clicked "reset" to the right of menu. It brought me to a page where the primary link settings can be changed.
Hope this helps.
wow
Huh, that totally isn't what happens for me. I have that Edit Primary (or Secondary) Links thing too but when I click it, it takes me to the theme configuration, where there is no longer any trace of the links configuration since they are in the menu configuration. It looked to me like it's just pointing to the wrong place, but maybe the problem is bigger than that.
Sounds like you are using a
Sounds like you are using a migrated site.
Turn on menu module in admin >> modules.
Then go to admin >> settings >> menu.
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
How to edit page.tpl.php
how do you edit this file to remove "edit primary links"?
I am having the same problem as others in that my Admin->menu page doesnt have a toggle or item for removing the primary links
Bypass
new location in drupal 4.7
this worked for me:
Administer -> Settings -> Menus
Menu containing primary links:
No Primary Links
thanks
thanks
it worked
Works for me too
Go down the the last "menus"
Administer -> Settings -> Menus
Menu containing primary links:
No Primary Links
Menu containing secondary links:
No secondary Links
Remove primary links
Thanks that works. Shouldn't it be in the handbook?
it is
http://drupal.org/node/63601
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
No options any more?
I upgraded to 4.7. I played around with the menues and the blocks and wanted to get rid of the 'edit primary links'. Now I have no primary nor secondary links in both admin > blocks and admin > menues. Still I have the 'edit primary links' on the top of bluemarine. I wonder how to get rid of it or how to recover the primary and secondary links if I want them back.
In 4.7 Primary and Secondary
In 4.7 Primary and Secondary links have been incorporated into the menu system. Your theme will still need to have the code to display them but behavior is handled through admin >> settings >> menu settings. Then links are added in admin >> menu.
http://drupal.org/node/63601
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
go to
Go to:
Home » administer » settings » menus.
look for "Menu containing primary links:"
set to No primary links
Regards,
underpressure
http://ravalonline.com
These tips don't help sites
These tips don't help sites that do want primary links, but also want content accessible only to authenticated users. The only way to make the "edit primary links" disappear would be to add at least one menu item linking to an external site -- this would still show up for anonymous users. Or edit the theme to add some logic e.g.
bug is here http://drupal.org/node/42826
Marked as "by design" I guess because people had trouble imagining a scenario where a site *does* want primary links for the users, but *does not* allow anonymous users to "access content".
Thanks - that's exactly the answer
Now I know that trying all the following suggestions won't work for me - I have exactly that scenario, a private site where anonymous users should not see any menu - that bug report talks all about it.
I still haven't finished reading that whole thread, but a pity they marked it "By design" !!! Sure don't seem like good design to me ... or my users! Probably will force me to use the "Front Page" module ... not something I wanted to do at this stage ...
I fixed this by editing menu.inc
Find the below code in includes/common.inc:
And comment it out like so:
This allows you to show the primary links if you want to and not show them if you don't.
I assume that this code could be deleted instead of commented out as all it does is cause problems.
'edit primary links' will still show until you delete it from the menu at admin/menu as it is a built in menu item to start with, as is the 'edit secondary links'.
yes - menu.inc not common.inc
in your paragraph, it says common, but it is menu.inc that one should edit, as in your title. truly awesome. thanks
Thanks
An elegant solution.
Primary Links for auth users only
Thanks for the posts; here's how I eventually got it. For 4.7, in page.tpl.php, I surrounded the primarly and secondary links (and the search box) with the following conditional requirement (the first and last lines), and now they are visible only for authenticated users.
There probably is some preferred way of making a function call in template.php, but I don't know how to do this, yet.
See also http://drupal.org/node/23449, php code snippets "Display different page content to anonymous and authenticated users."
Remove "edit primary links"
I had the same problem, fixed it today.
Do like this:
1. Go to "administer"
2."settings"
3."menus"
4."Menu containing primary links:"
5.Scroll down and click on - "No primary links"
6. Problem solved!