0

I created in TYPO3 a new typeNum (based on unix timestamp) to render a dynamic javascript file. Now I want to include this dynamic javascript file using:

page.headerData.123 = TEXT
page.headerData.123{
    typolink.parameter = {$global.homePid}, 123
    typolink.returnLast = url
    wrap = <script type="text/javascript" src="|"></script>
}

And this works. But I have also installed the extension RealURL and want to get a nice looking path to this dynamic js file.

So I have added this, to realurl_conf.php:

'fileName' => array(
    'defaultToHTMLsuffixOnPrev' => 1,
    'index' => array(
        'mycool.js' => array(
            'keyValues' => array(
                'type' => 123
            )
         ),
    ),
),

This will be ignored.

-

Workarround

If I add

typolink.additionalParams = &js=123

to typolink generation and

'keyValues' => array(
    'js' => 123
)

to RealURL configuration, it works.

Why is the predefined TYPO3 get parameter type not working?

Armin
  • 15,582
  • 10
  • 47
  • 64

1 Answers1

2

you should not set the typeNum via typolink.additionalParams but use typolink.parameter instead:

typolink.parameter = ID, TYPE
e.g.
typolink.parameter = {$global.homePid}, 123

or try something "dirty" like this:

NO additionalParams = &type=123
NO parameter = ID, TYPE 

but

wrap = ...script type="text/javascript" src="|&type=123">...

cheers!

t.

Armin
  • 15,582
  • 10
  • 47
  • 64
kleintim
  • 21
  • 2
  • 1
    Adding type to parameter works for the `preVars` part in realURL conf, but the `fileName` part is still not working. Your second, dirty try will not work, cause realURL will ignore the type at all. – Armin Feb 26 '14 at 09:43