Skip to content

Instantly share code, notes, and snippets.

@astehlik
Created February 6, 2015 09:23
Show Gist options
  • Save astehlik/bc3478a4759eccbda645 to your computer and use it in GitHub Desktop.
Save astehlik/bc3478a4759eccbda645 to your computer and use it in GitHub Desktop.
TYPO3 TypoScript snippet for testing JumpURL
config.jumpurl_enable = 1
page = PAGE
page {
// Old configuration
10 = TEXT
10.value = fileadmin/myfile.txt
10.noTrimWrap = |<p>filelink: |</p>|
10.filelink {
jumpurl = 1
jumpurl.secure = 1
}
// New configuration
11 = TEXT
11.value = fileadmin/myfile.txt
11.noTrimWrap < .10.noTrimWrap
11.filelink {
typolinkConfiguration.jumpurl = 1
typolinkConfiguration.jumpurl.secure = 1
}
20 = TEXT
20 {
parseFunc = 1
parseFunc.makelinks = 1
parseFunc.makelinks.http.jumpurl = 1
parseFunc.makelinks.mailto.jumpurl = 1
value (
<p>
parseFunc makelinks<br>
mailto:[email protected]<br>
http://www.google.de
</p>
)
}
30 = TEXT
30.noTrimWrap = |<p>typolink external: |</p>|
30.typolink.parameter = http://typo3.org
30.typolink.jumpurl = 1
31 < .30
31.noTrimWrap = |<p>typolink file: |</p>|
31.typolink.parameter = file:1:/myfile.txt
32 < .31
32.noTrimWrap = |<p>typolink file secure: |</p>|
32.typolink.jumpurl.secure = 1
}
@astehlik
Copy link
Author

astehlik commented Feb 6, 2015

To test this the file myfile.txt needs to exist in fileadmin/!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment