typo3

Get uid of new record in hook processDatamap_afterDatabaseOperations

限于喜欢 提交于 2019-12-13 15:06:33
问题 When creating new database records, TYPO3 assigns them a temporary UID, which looks like this: NEW56fe740dd5a455.64167468 . The record gets its real UID when it is inserted into the database. In the above hook, the record is already inserted into the database, so it has a numerical uid assigned. How do I get that uid from a given temporary UID? 回答1: Ok, found it. The fourth parameter of the hook-method is the datahandler object, which has a property substNEWwithIDs , an associative array

The controller “X” is not allowed by this plugin

守給你的承諾、 提交于 2019-12-13 12:36:21
问题 I try to add a new controller which has one action called confirmAgbAction . <?php namespace Eddcapone\MyExtension\Controller; /** * CustomController */ class CustomController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { /** * action list * * @return void */ public function confirmAgbAction() { echo "<p>HALLO WELT</p>"; } } I even added it to ext_localconf.php <?php if (!defined('TYPO3_MODE')) { die('Access denied.'); } \TYPO3\CMS\Extbase\Utility\ExtensionUtility:

TYPO3: How to add a css and JS on the backend

若如初见. 提交于 2019-12-13 12:09:59
问题 How do i add css and javascript file(s) on the backend? I would like to use those files for custom created content elements in order to make them more appealing for the user. System : TYPO3 v9 Mode : Composer Mode Target : Custom Content element 回答1: In TYPO3 v9 you will have to do the following and on every mode CSS $GLOBALS['TBE_STYLES']['skins']['your_extension_key'] = array(); $GLOBALS['TBE_STYLES']['skins']['your_extension_key']['name'] = 'My Awesome Name'; $GLOBALS['TBE_STYLES']['skins'

Howto add documentation to TYPO3 Extension

别来无恙 提交于 2019-12-13 12:05:43
问题 Is there a step by step manual how to add documentation to a TYPO3 extension? I added two extensions to the repository but I would like to add some documentation, too. In earlier times of the TYPO3 repository this was quite easy - as far as I can remember a OpenOffice document had to be added to the extension... I found this "howto" I'm using macOS Sierra and I installed a lot of stuff: Xcode, MacPorts, Sphinx,... I did all these pip installs But calling make in the _make directory of the

How to place TYPO3 frontend output in anywhere

孤人 提交于 2019-12-13 11:09:45
问题 I am new to TYPO3 and creating a TYPO3 extension. Extension can be added to a given place by the BE using the wizard. No problem. My question is how can I add/call extension manually any place I want. For example among text. What i mean is like Joomlas Mambots. Call the extension inside {myextentionName} among text for example. Please any idea/help with an example is kindly appreciate. 回答1: You can find the TypoScript definition for each plugin below tt_content.list.20.<plugin-key> . On top

TYPO3 userFunc give GET Parameter to php file

半腔热情 提交于 2019-12-13 09:13:38
问题 I am including a php file via userFunc and want to give the get parameter "?session_start=1" and use this in the function. TS: includeLibs.voucher = fileadmin/php/shop_init.php lib.phpscript = USER lib.phpscript.userFunc = voucher->init lib.phpscript.session_start_var = GP:session_start php file <?php class voucher { public function init($content ="", $conf){ $session_start = $conf['session_start_var']?t3lib_div::_GP($conf['session_start_var']):false; $lang_id = ($GLOBALS['TSFE']->sys

TYPO3 add image upload field to feuser

可紊 提交于 2019-12-13 08:36:22
问题 TYPO3 version 7.6.18. I need to extend fe_user with new field for uploading image ? How to do it? I need add this field to front-end and back-end ext_tables.php CREATE TABLE fe_users ( backgroundimage int(11) unsigned NOT NULL default '0' ); User.php class User extends \In2code\Femanager\Domain\Model\User { /** * @var string */ protected $backgroundimage = null; /** * Returns the background value * * @return string * @api */ public function getBackgroundimage() { return $this->backgroundimage

TYPO3 loading default language instead of translation

江枫思渺然 提交于 2019-12-13 08:05:49
问题 I'm using TYPO3 (with no other choice for the moment) and I have to add a secondary language to the website. I have 2 languages: Default : English (en) set as L = 0 English US (en_US) set as L = 1 I've made the change in the RealUrl and in the main template. config.sys_language_uid = 0 config.language = en config.locale_all = en_US.UTF-8 page.config.language = en config.linkVars = L [GLOBAL] [globalVar = GP:L = 1] config { sys_language_uid = 1 htmlTag_langKey = en_US language = en_US locale

With TYPO3 be_layout, how to choose frontend template correctly (performance-wise)?

早过忘川 提交于 2019-12-13 07:16:58
问题 In most of my sites, I've been using the following code to decide which template should be applied to the content rendering - based on what the editor has picked in be_layout : page.10 = TEMPLATE page.10 { stdWrap.if { value = 1 isInList.data = levelfield:-1,backend_layout_next_level,slide isInList.override.data = TSFE:page|backend_layout } template = FILE template.file = fileadmin/templates/main/tmpl/main.html ... } page.20 = TEMPLATE page.20 { stdWrap.if { value = 2 isInList.data =

Datatables (Server-side processing) in Typo3 with FCE and Templavoila

血红的双手。 提交于 2019-12-13 06:52:31
问题 I'm trying to implement https://www.datatables.net/examples/data_sources/server_side.html into Typo3 (6.2LTS) with a flexible content element and templavoila. The result is a functioning but empty (No data available in table) table at the moment. I'm using the following php script: <?php class custom_datatable { var $datatable; // reference to the calling object. function custom_table1($columns,$conf) { global $TSFE; $TSFE->set_no_cache(); //do whatever you want here //db verbindung mysql