How can I create a fluxfield to create a link to another page, where the user can chose the page in a pagetree. Something like the Modify Link
from the RTE. Is there something?
Or how else would I create a field for a internal link? Just an inputfield where the use can input the PageID is not enough.
One more step would be a field where the user can input an internal link OR an external link.
Have not found any good solution for this problem yet. How do you do it?
You can use a normal text input, but add a link wizard to it. Looks like this:
<flux:field.input
name="link"
label="Link!"
>
<flux:wizard.link/>
</flux:field.input>
To output the link, use one of the ViewHelpers v:(link|uri).typolink
from EXT:vhs:
<v:link.typolink configuration="{parameter: link}">
Linktext
</v:link.typolink>
This works for all kinds of links.