Skip to content

Instantly share code, notes, and snippets.

@stafast
stafast / tx_ext_domain_model_myselect.php
Created January 17, 2020 07:23
TCA displayCond, reload onchange not working, requestUpdate
[
'ctrl' => [
'requestUpdate' => 'mySelect,myOtherSelect'
]
]
@stafast
stafast / meta.t3s
Created December 19, 2017 10:56
TYPO3 Meta Canonical Tag with baseUrl
headerData {
10 = TEXT
10 {
typolink {
parameter.data = page:uid
parameter.intval = 1
useCacheHash = 0
addQueryString = 1
addQueryString.method = GET
addQueryString.exclude = id, cHash, tx_pagebrowse_pi1[page]
@stafast
stafast / PDFMergerController.php
Created November 23, 2017 19:01
TYPO3 PDF Merger
use setasign\Fpdi\Fpdi;
-- -- -- --
header("X-Robots-Tag: noindex", true);
$this->response->setHeader('Cache-control', 'public', TRUE);
$this->response->setHeader('Content-Description', 'File transfer', TRUE);
$this->response->setHeader('Content-Disposition', 'attachment; filename=students.pdf', TRUE);
$this->response->setHeader('Content-type:application/pdf; charset=utf-8', TRUE);
$this->response->sendHeaders();
@stafast
stafast / php.ini
Created September 4, 2017 10:34
laravel php artisan [ErrorException] Invalid argument supplied for foreach()
register_argc_argv = On
@stafast
stafast / pagetsconfig.ts
Created January 24, 2017 10:07
TYPO3 PageTSConfig Condition pid (PageID)
[page|uid = 12]
mod.wizards.newContentElement.wizardItems.special.show := removeFromList()
[global]
@stafast
stafast / solr.ts
Last active July 27, 2016 07:49
Solr IndexQueue htpasswd htaccess directory protection
plugin.tx_solr.index.queue.pages.indexer.authorization {
username = username
password = password
}
@stafast
stafast / realurl_conf.php
Created June 22, 2016 16:57
TYPO3 realUrl Extension Extbase cHash controller action
<?php
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
'postVarSets' => array(
'_DEFAULT' => array(
'controller' => array(
array(
'GETvar' => 'tx_EXT_pi1[action]',
'noMatch' => 'bypass'
),
array(
@stafast
stafast / SliderRenderer.php
Created June 15, 2016 07:41
Preview Rrenderer for IRRE with FAL
<?php
namespace Slider\Slider\Hooks;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\View\PageLayoutView;
use TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Contains a preview rendering for the page module of CType="slider"
@stafast
stafast / MediaGallery.html
Created May 27, 2016 10:07
TYPO3 Fluid Styled Content Text Media Gallery Bootstrap Grid
<div class="ce-column
{f:if(condition:'{gallery.count.columns}<{data.imagecols}',then:'
col-sm-{f:cObject(typoscriptObjectPath:\'lib.math\',data:\'12/{data.imagecols}\')}
',else:'
col-sm-{f:cObject(typoscriptObjectPath:\'lib.math\',data:\'12/{gallery.count.columns}\')}
')}
">
@stafast
stafast / gmap.js
Created February 4, 2016 12:43
Responsive Google Map
google.maps.event.addDomListener(window, 'load', init);
var map;
function init() {
......
// Resizer
google.maps.event.addDomListener(window, 'resize', function() {
map.setCenter(mapOptions.center);
});
}