typo3typolink

Typolink parameter


I created a modal window with the ext. Typo3v12 contentblocks. I have to access a typolink as a variable from the database (tt_content) Typo3 typolink

This works only if the parameter (parameter = 169) directly indicates the UID pages. How can I do this a variable?

Html

     <f:if condition="{data.url}">
             <iframe id="modalIframe{data.uid}" src="{f:cObject(typoscriptObjectPath: 'lib.pageLink')}"></iframe>

        </f:if>

setup.typoscript

lib.pageLink = TEXT
lib.pageLink {
  typolink {
    parameter = 169
    #parameter.data.override.cObject.field = modal_url
    #parameter.field = modal_url
    if.isTrue.field = modal_url
    returnLast = url
    additionalParams = &type=100
  }
}

Solution

  • I wouldn't implement it so complicated. The much easier approach would be to use the f:uri.typolink Viewhelper -> https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Uri/Typolink.html just pass your modal_url as parameter and you get the URL in return for your iFrame. you can register your type with the argument "additionalParams".

    Example:

    <f:uri.typolink parameter="{modal_url}" additionalParams="{type: 100}"/>