[TYPO3-dev] tslib_content_stdWrapHook and TYPO3 v4.5.0 different from previous versions

Peter Klein peter at clioonline.dk
Sun Feb 13 14:31:38 CET 2011


In one of my extensions (PMK Forced Download), I use the
"tslib_content_stdWrapHook" hook in
"/sysext/cms/tslib/interfaces/interface.tslib_content_stdwraphook.php"
to extend stdWrap.

In TYPO3 versions prior to v4.5.0, I could pass a parameter from
TypoScript like this:

-- cut --
10 = TEXT
10.value = download
10.typolink.parameter = fileadmin/templates/testfile.pdf
10.typolink.parameter.makeDownloadLink = 1
-- cut --

And then in the hook I access my custom stdWrap parameter
"makeDownloadLink", like this:

-- cut --
	public function stdWrapProcess($content, array $configuration,
tslib_cObj &$parentObject) {
		if ($configuration['makeDownloadLink']) {
			$content =
tx_pmkfdl::makeDownloadLink($content,$configuration);
		}
		return $content;
	}
-- cut --

But in TYPO3 v4.5.0 this no longer works. I now have to specify the
TypoScript parameter like this:

-- cut --
10 = TEXT
10.value = download
10.typolink.parameter = fileadmin/templates/testfile.pdf
10.typolink.parameter.stdWrapProcess.makeDownloadLink = 1
-- cut --

And to access it in the hook I need to do this:

-- cut --
	public function stdWrapProcess($content, array $configuration,
tslib_cObj &$parentObject) {
		if
($configuration['stdWrapProcess.']['makeDownloadLink']) {
			$content =
tx_pmkfdl::makeDownloadLink($content,$configuration);
		}
		return $content;
	}
-- cut --


Is this intentional or a bug?

--
Peter Klein / Clio Online




More information about the TYPO3-dev mailing list