typo3fluxfedexttypolink

FLUX configuration for a typolink


How can I use a typolink-field at my FLUX Flexform-Configuration (Backend)

<f:section name="Configuration">
  <flux:form id="home" options="{icon: 'Icons/Content/myicon.gif', group: 'Homepage'}">
  <flux:field.input name="txtHeadline" label="Headline" />

  <!-- ?? -->
  <flux:field.input name="lnkTarget" label="Link">
     <flux:wizard.link />
  </flux:field.input>

  </flux:form>
</f:section>

Main Section:

{namespace v=Tx_Vhs_ViewHelpers}
...
<v:link.typolink parameter="{parameter: section.item.url}">Beautiful link</v:link.typolink>

<!-- or -->
<v:uri.typolink parameter="{parameter: section.item.url}" />

That's my first steps with FLUID Powered TYPO3 and I have no idea? Thanks for your help. I need this input field and the link wizard for the 'normal' output: <a href="mylink" class="xy" />

enter image description here


Solution

  • Jost is right. You need to pass the value from the field to the TypoLink ViewHelper from VHS.

    Being partially compatible with the TYPO3 CMS Core typolink function, you need to pass your field value as parameter.

    Having a form field like:

    <flux:field.input name="lnkTarget" label="Link">
         <flux:wizard.link />
    </flux:field.input>
    

    Example with the plain contents of a field:

    <v:link.typolink configuration="{parameter: lnkTarget}" />
    

    Example with custom overrides/additions to the field value:

    <v:link.typolink configuration="{parameter: lnkTarget, additionalParams: '&print=1', title: 'Follow the link'}">
      Click Me!
    </v:link.typolink>
    

    Notice where I placed {lnkTarget}.

    You can look those up in the DocComent Block on the ViewHelpers:

    Being one of the maintainers, if you need further feedback-please raise an issue on the Github project if you have problems using it or join us on IRC (#fedext on Freenode)