0

(Edit 7/17/2014) Forgot to mention earlier: I am using ExpressionEngine, Wygwam, and Structure together.

I can set link type to "link to anchor in text"... but that's only for the current document...

Alternately I can set link type to "structure page"...

But how can I set link type to "anchor within structure page"? It's not an option, but is there a way to do it?

I know I can hardcode the link in by setting link type to "URL" and just typing it in with the #anchor at the end... but I am trying to avoid this so that the link will work in the future if I change the page name/location within structure.

2
  • Where are you trying to do this? Is this in a wysiwyg editor or what? Commented Jul 14, 2014 at 20:43
  • Wygwam, inside of expressionengine... sorry forgot to mention
    – dcpl
    Commented Jul 17, 2014 at 13:08

2 Answers 2

1

It's not possible without writing your own (wysiwyg or EE) plugin.

0

You could append #whatever to {page_url} so that's it always dynamic. The anchor itself could even be drawn from a custom field within entries.

1
  • Hi Travis... sorry this doesn't make sense to me... I forgot to mention earlier that I'm dealing with Wygwam inside of ExpressionEngine. For links, there is an option for a URL where you type in any URL you like. But if you're using Structure, you can also choose a Structure page within your site structure. This is the option I want to take as it allows for changes later (if I move the page in structure, it will automatically update my links). There is no {page_url} I can add a #anchor to. Your comment seems to suggest a template approach, but I am dealing with content here, not the template.
    – dcpl
    Commented Jul 17, 2014 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.