First you make an instance of the tslib_fe class like:
$GLOBALS['TSFE'] = t3lib_div::makeInstance('tslib_fe',
$GLOBALS['TYPO3_CONF_VARS'],
t3lib_div::_GP('id'),
t3lib_div::_GP('type'),
and more variables if you want
);
(please check your incoming values 😉
Do some other stuff (check if you need this)
$GLOBALS['TSFE']->connectToMySQL();
$GLOBALS['TSFE']->initFEuser();
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->getCompressedTCarray();
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getConfigArray();
And you can get the configuration at:
$configuration =
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_yourextension_controller.'];
Related products同样显示在产品详细页面中,与Upsells不同,Related products默认会显示在右侧边栏。这些产品被用来设计推荐给用户该产品之外的配套产品。比如用户在浏览笔记本电脑的时候,在右侧的Related products中可能会显示笔记本电脑鼠标,笔记本电脑屏幕保护膜等产品。
Adding a localization to an “Extension Builder” generated TYPO3 extbase extension could be a little tricky as it uses the xlf (XLIFF) format.
This is a simple way to add new localizations without using extra tools like Virtaal or a Pootle server.
1. copy file and prefix filename with language coed: example.xlf to de.example.xlf
2. add target-language=”de” attribute to node file
3. change source nodes to target
Please make sure…
your files are UTF8 encoded
to encapsulate special chars in CDATA
Dummy text
Default language xlf file (locallang.xlf)
Das ist ein Test.
German language xlf file (de.locallang.xlf)
For example: An image which is 400×300 pixels shrunk to fit a 100×100 pixel box will normal (with the above) have a size of 100×75 pixels. We want to add some padding borders to the top and bottom of the image (and to the sides to be sure) to make the final thumbnail image always 100×100 pixels in size.
There are a number of ways to do this, and as of IM v6.3.2 the best way is using the “-extent” option. (continue reading…)