What is the proper way to put only a named anchor in a link url. I want do have href="#anchor_name". When I try putting just #anchor_name in the text field I get a validation error. Is it possible for a user to do this without including the url of the page in the field?

CommentFileSizeAuthor
#3 link.anchors_1072304_3.patch1.27 KBjtsnow
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcfiala’s picture

Assigned: Unassigned » jcfiala

That's a good question. I don't know the answer off of the top of my head, but I'm definitely flagging this issue for my attention later.

KoshaK’s picture

please look at this - works for me, but if you can do anything to help with my problem on the second reply to that comment.
http://drupal.org/node/325533#comment-3460720

in menu path you just type http://current/#ANCHOR - and the menu item is linked to the anchor on the any page currently displayed.

jtsnow’s picture

Title: only named anchor in link » Patch
Status: Active » Needs review
FileSize
1.27 KB

I've created a patch against the latest 6.x-2.x snapshot that allows this functionality.

jtsnow’s picture

Title: Patch » only named anchor in link

Switching title back... oops

Summit’s picture

Subscribing, greetings, Martijn

dqd’s picture

Assigned: jcfiala » Unassigned
Status: Needs review » Closed (duplicate)
Issue tags: +field validation

Nice solution. Is this already in? If not please go here ->

Dear followers of this issue: please read the project page info of link module for the further way to go for URL validation issues. There is already an main issue to collect and discuss ALL possible validation scenarios in general. That's why I will mark this one here as duplicate. I need all concentration inside the ONE and only discussion to move forward. After a D7 implementation we will provide a D6 backport.

Explanation: There are too many corner cases and URL validation feature requests of users to implement them all one after the other. We would have a 40 inüut fields and checkbox lines cluttered settings form for URL validation methods only, conflicting with each other randomly. I think, the better way is to find a maybe more complex but all-embracing new configuration method, which lets the admin better decide, how and when to validate the url. Including a good description which helps to set it up. This will surely lead to a new branch