I try:
node/52753 -> skill/3517/penmanship#skills
but when I attempt to browse to node/52753
I get redirected to skill/3517/penmanship%2523skills

Comments

brian_c’s picture

If you are using Drupal's l() or url() functions to construct the URL, you need to pass in fragments (plus queries and other items) as part of the options array.

Ie,


$url = url( 'skill/3517/penmanship', array( 'fragment' => 'skills' ) );

$link = l( 'Link text', 'skill/3517/penmanship', array( 'fragment' => 'skills' ) );

If you're just trying to do it with just a straight URL Alias, I don't think that's possible. Why would a node need to define it's URL alias as pointing to a specific section of itself? Just do a normal alias and construct your links (with or without # fragment) at the theming layer using l() or url().

der100’s picture

The '#skills' portion is for a tabbed/accordion display.
'skills' is the tab that we want to be active when the page is displayed.

brian_c’s picture

Why not just make the #skills section open by default when there's no anchor specified?

nicholasthompson’s picture

Status: Active » Closed (won't fix)

GR doesn't touch fragments (they dont get passed back to the server) so I believe your problem is elsewhere.

dman’s picture

Here's an old thread. Any clues there? It points at path.module being the encoder.
It should be allowed for any URL to be valid without being munged.