Skip to content

Instantly share code, notes, and snippets.

View oliverthiele's full-sized avatar

Oliver Thiele oliverthiele

View GitHub Profile
@oliverthiele
oliverthiele / Lib.breadcrumb.t3s
Created August 19, 2015 15:07
TYPO3 Rootline Menu / Breadcrumb with RDFa metadata
/**
* TYPO3 Rootline menu with RDFa metadata
*
* @author Oliver Thiele
* @see https://developers.google.com/structured-data/breadcrumbs
*/
lib {
breadcrumb = HMENU
breadcrumb {
special = rootline
@oliverthiele
oliverthiele / GravatarViewHelper.php
Created April 20, 2015 13:21
TYPO3 Fluid GravatarViewHelper
<?php
namespace OliverThiele\OtWebsite\ViewHelpers;
use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper;
/**
* Class GravatarViewHelper
*
* @package OliverThiele\OtWebsite\ViewHelpers
*/
class GravatarViewHelper extends AbstractFormFieldViewHelper {
@oliverthiele
oliverthiele / LocalConfiguration.php
Created December 11, 2014 13:12
Redis Configuration in TYPO3
<?php
return array(
// ...
'SYS' => array(
'caching' => array(
'cacheConfigurations' => array(
'cf_cache_hash' => array(
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend',
'options' => array(
'database' => 10,
@oliverthiele
oliverthiele / ModelController.php
Created July 22, 2014 20:33
Debugging errors like "An error occurred while trying to call Vendor\ExtKey\Controller\ModelController->showAction() " in extbase extensions
/**
* A special action which is called if the originally intended action could
* not be called, for example if the arguments were not valid.
*
* The default implementation sets a flash message, request errors and forwards back
* to the originating action. This is suitable for most actions dealing with form input.
*
* We clear the page cache by default on an error as well, as we need to make sure the
* data is re-evaluated when the user changes something.
*
@oliverthiele
oliverthiele / TruncateDbCache.phpsh
Last active August 6, 2019 19:30
Truncate TYPO3 Cache (DB and typo3temp/Cache/*)
#!/usr/bin/php -q
<?php
/**
* Truncates all TYPO3 cf_% and cache_% database tables
*/
function fetchArray($in) {
if(is_file($in)) {
return include $in;
} else {
@oliverthiele
oliverthiele / Template.html
Created June 30, 2014 15:51
Nested TYPO3 Fluid TranslateViewHelper for a localized string with localized date as argument.
<f:translate extensionName="ot_website" id="page_created" arguments="{0: '{f:format.date(date: \'@{data.crdate}\', format: \'{f:translate(id: \\\'formatDate\\\', extensionName: \\\'ot_website\\\')}\')}'}" />