Skip to content

Instantly share code, notes, and snippets.

View benjaminrau's full-sized avatar

Benjamin Rau benjaminrau

View GitHub Profile
@benjaminrau
benjaminrau / gist:9686724
Created March 21, 2014 13:51
Asset with Conditon
# HTML5Shiv Asset for lt IE 9
[browser = msie && version = <9]
plugin.tx_vhs.settings.asset.html5shiv {
path = EXT:mamtemplates/Resources/Public/Javascript/html5shiv.min.js
standalone = 1
}
[global]
@benjaminrau
benjaminrau / FCE usage
Last active August 29, 2015 13:57
Usage of v:content.resources.fal or v:resource.record.fal
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace v=Tx_Vhs_ViewHelpers}
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form id="gallery" wizardTab="MG">
<flux:field.inline.fal name="settings.images" multiple="TRUE" maxItems="20" />
</flux:form>
</f:section>
@benjaminrau
benjaminrau / gist:9911595
Created April 1, 2014 10:34
RealUrl Conf für Sprache
$realurlConf['pagePath'][''languageGetVar'] = 'L';
$realurlConf['preVars'] = array(
array(
'GETvar' => 'L',
'valueMap' => array(
'' => '0',
'de' => '1'
),
'noMatch' => 'bypass',
),
@benjaminrau
benjaminrau / gist:9914762
Created April 1, 2014 14:06
Localization Setup in Typoscript
# Localization
config {
linkVars = L
sys_language_uid = 0
language = en
locale_all = en_EN.utf-8
htmlTag_langKey = en-EN
sys_language_mode = strict
}
[globalVar = GP:L=1]
@benjaminrau
benjaminrau / FCE.html
Created April 7, 2014 12:51
Using foreignTypes for inline relations
<flux:field.inline.fal
name="settings.images"
multiple="TRUE"
maxItems="20"
foreignTypes="{
2: {showitem: '--palette--;LLL:EXT:vmtemplates/Resources/Private/Language/locallang.xlf:flux.turningTiles.fields.settings.images.single;turningTilesPalette,--palette--;;filePalette'}
}" />
@benjaminrau
benjaminrau / Example.html
Last active August 29, 2015 13:58
Prev / Next Links for tx_news detail view. Works only if your list view is sorted by "datetime desc"
{namespace vm=Vm\Vmtemplates\ViewHelpers}
<div class="navigation">
<vm:link.next newsItem="{newsItem}" settings="{settings}" class="news-next">
<span></span>
</vm:link.next>
<vm:link.prev newsItem="{newsItem}" settings="{settings}" class="news-prev">
<span></span>
</vm:link.prev>
</div>
function addScript(src, callback) {
var s = document.createElement('script');
s.setAttribute('src', src);
s.setAttribute('type', 'text/javascript');
document.head.appendChild(s);
if (callback !== "undefined") {
s.onreadystatechange= function () {
if (this.readyState == 'complete') {
callback();
@benjaminrau
benjaminrau / QueryRepository.php
Last active August 29, 2015 14:01
ViewHelper to query dynamic repository
<?php
/***************************************************************
* Copyright notice
*
* (c) 2014 Benjamin Rau <rau@codearts.at>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
<f:section name="SearchInput">
<div class="searchContainer">
<form action="{f:uri.page(pageUid: '{v:var.typoscript(path: \'plugin.tx_indexedsearch.searchUID\')}')}"method="get" id="tx_indexedsearch">
<input type="hidden" name="tx_indexedsearch[sections]" value="0" />
<input type="text" name="tx_indexedsearch[sword]" placeholder="Suchen..." />
</form>
</div>
</f:section>
@benjaminrau
benjaminrau / Gallery.html
Created August 25, 2014 07:10
Gallery FCE as example how to use fal images in Flux Content Elements