typo3

Get tt_content uid

You fetch all tt_content’s data in array:

$this->cObj->data

ie:

$uidOfCE = $this->cObj->data['uid'];

If you’re using Extbase of course you need to get the content object first, ie:

$this->contentObj = $this->configurationManager->getContentObject();
debug($this->contentObj->data, "current tt_content's data");

typo3 flash message

$flashMessage = t3lib_div::makeInstance(
        't3lib_FlashMessage',
        'message',
        'title',
        t3lib_FlashMessage::INFO
);
$content .= $flashMessage->render();

t3lib_FlashMessage::NOTICE
t3lib_FlashMessage::INFO
t3lib_FlashMessage::OK
t3lib_FlashMessage::WARNING
t3lib_FlashMessage::ERROR

TS PHP_SCRIPT

TYPOSCRIPT

temp.phpScript = PHP_SCRIPT
temp.phpScript {
    file = fileadmin/scripts/php_script.inc.php
    myVerySpecialOwnParameter = bla
    myParamArray {
        a = 1
        b = ja
    }
}
page.30.70.10 < temp.phpScript

php_script.inc.php
PHP

' );
?>

TYPO3: RTE embed / iframe tag

TYPO3: RTE embed / iframe tag

According to Google Analytics a lot of people are currently looking for a way to use embed tags within the (tt_news) RTE. By default the TYPO3 RTE will remove these embed tags, but it’s fairly easy to change this. In this tutorial I’ll show you how to insert an iframe, within the TYPO3 RTE.
(continue reading…)


Typoscript Auto Copyright

## Copyright Notice [Begin]
      # Automatic year update
      lib.copyright = TEXT
      lib.copyright.data = date:U
      lib.copyright.strftime = %Y
      lib.copyright.wrap = 
      # secondary language copyright notice
      [globalVar = GP:L = 1]
        lib.copyright.wrap = 
      [end]
      ## Copyright Notice [End]

TBE_EDITOR.rawurlencode erroneously adds “=” in wizards

If you use a wizard for a colorpicker or a link in TYPO3 4.4.8 and 4.5.3 (haven’t tested with older versions) and click on the wizard button, the current value of the field is retrieved in the window.open() function using

TBE_EDITOR.rawurlencode(document.editform[‘data[pages][1][tx_testextension_color]_hr’].value,200)
TBE_EDITOR.rawurlencode(document.editform[‘data[pages][1][tx_testextension_internet]_hr’].value,200)
This returns a wrong value, because TBE_EDITOR.rawurlencode always adds a “=” in front:
– If the value is empty, “=” will be returned, resulting in a default value “http://=” in the link wizard.
– If a value is set in the color picker, e.g. “#333666”, the result of TBE_EDITOR.rawurlencode will be “=#333666” in the colorpicker wizard. (continue reading…)


Displaying the current date

You can display the current date in various formats on a web site. This can be implemented by using the PHP function strftime within your TypoScript template record. (continue reading…)


tt_content自定义type

h1-h6扩展:
1. 在根page的option里配置TS

TCEFORM.tt_content.header_layout.addItems.99 = test

2. 在page.setup的TS里配置:

lib.stdheader = COA
lib.stdheader{
  10.99 < .10.1
  10.99.fontTag = 
|
}

({register:headerStyle}{register:headerClass}为系统自动生成, 可自定义)

Indentation and Frames 扩展:

TCEFORM.tt_content.section_frame.addItems.99 = register frame
tt_content.stdWrap.innerWrap.cObject{
  99 =< tt_content.stdWrap.innerWrap.cObject.default
  99.15.value = register_now
}

Frontend layout

TCEFORM.pages.layout.altLabels.0 = Default
TCEFORM.pages.layout.altLabels.1 = layout one
TCEFORM.pages.layout.altLabels.2 = layout two
TCEFORM.pages.layout.altLabels.3 = layout three
TCEFORM.pages.layout.addItems.4 = layout new1

TS重写MENU逻辑

1{
	expAll = 1   #sub menu all show
	wrap = 
    |
NO.doNotLinkIt = 1 #NO.stdWrap.htmlSpecialChars = 1 NO.wrapItemAndSub = | NO.allWrap.dataWrap=

New mail API for the core

TYPO3 4.5 comes with the Swift Mailer library as the new mail API. It’s quite easy to use it in extensions. (continue reading…)


Copyright © 1996-2010 Add Lives. All rights reserved.
iDream theme by Templates Next | Powered by WordPress