Skip to content

Instantly share code, notes, and snippets.

View daKmoR's full-sized avatar
❤️
Web Components & open-wc

Thomas Allmer daKmoR

❤️
Web Components & open-wc
View GitHub Profile
{namespace flux=Tx_Flux_ViewHelpers}
{namespace v=Tx_Vhs_ViewHelpers}
<f:section name="Configuration">
<flux:flexform id="one" label="OneColumn" icon="../typo3conf/ext/site_default/Resources/Public/Icons/Page/OneColumn.png">
<flux:flexform.field.checkbox name="settings.showHeaderSlideshow" label="Show Header Slideshow" default="1" />
<flux:flexform.field.input name="settings.headertext" label="Header Text" />
<flux:flexform.field.inline.fal name="settings.header" label="Header Image" />
<flux:flexform.grid>
@daKmoR
daKmoR / toNamespaces.sh
Last active December 21, 2020 18:37
Converts a TYPO3 CMS extension from using non-namespaced names to namespaced names (used since TYPO3 6.0) Usage: just copy the file inside your extension and call it from the shell ./toNamespaces.sh It replaces MOST of the non-namespaced calls... but it's by far not perfect, so pls handle with care and ALWAYS look what it changed before commitin…
#!/bin/bash
search=()
replace=()
# 0
search+=("'tx_cms_layout'")
replace+=("'TYPO3\\\\CMS\\\\Backend\\\\View\\\\PageLayoutView'")
search+=("Facets_ChildNodeAccessInterface")
@daKmoR
daKmoR / Root.ts2
Created September 27, 2013 09:15
page = Page
page.head {
stylesheets = TYPO3.TypoScript:Template
stylesheets {
templatePath = 'resource://[...]/Private/Templates/Page/Default.html'
sectionName = 'stylesheets'
}
scripts = TYPO3.TypoScript:Template
@daKmoR
daKmoR / Box.html
Last active December 22, 2015 17:39
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<neos:contentElement node="{node}">
<div class="box">
<ts:render path="columnContent" />
</div>
</neos:contentElement>
<?php
/**
* creates the actual text and sends it via e-mail
*
* @param $newForm
* @validate $newForm Tx_Xform_Domain_Validator_XformValidator
* @return void
*/
public function createAction(Tx_Xform_Domain_Model_Form $newForm) {
$view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
@daKmoR
daKmoR / Example.html
Created October 14, 2011 14:05
GroupedForDateTimeViewHelper for Fluid
<div class="itemsListYearMonth">
<a:groupedForDateTime each="{items}" as="itemsByYear" groupBy="start" format="Y" groupKey="year">
<a:groupedForDateTime each="{itemsByYear}" as="itemsByMonth" groupBy="start" format="m" dateTimeKey="month">
<div class="yearMonth clearfix">
<div class="timeframe" data-behavior="FixTimeframe">
{month -> f:format.date(format: 'F Y')}
</div>
<f:for each="{itemsByMonth}" as="item">
<div class="item">
<p class="startEnd"><a:format.duration start="{item.start}" end="{item.end}" /></p>
@daKmoR
daKmoR / DateMenu.html
Created July 25, 2011 09:12
Datemenu for News2
<div class="news2 news2-datemenu">
<ul>
<f:groupedFor each="{news}" as="newsByYear" groupBy="yearOf{dateField}" groupKey="year">
<f:if condition="{settings.datemenu.year}">
<li class="{f:if(condition: '{year} == {overwriteDemand.year}', then: 'active year', else: 'year')}"><f:link.action pageUid="{listPid}" arguments="{overwriteDemand:{year: year}}">{year}</f:link.action>
<ul>
</f:if>
<f:groupedFor each="{newsByYear}" as="newsByMonth" groupBy="monthOf{dateField}" groupKey="month">
<f:if condition="{settings.datemenu.month}">
@daKmoR
daKmoR / Controller.php
Created March 4, 2011 01:15
implementing a demand overwrite in Extbase
<?php
/**
* Displays all Labors
*
* @param Tx_CdgLabors_Domain_Model_Demand $demand
* @param array $demandOverwrite
* @return string The rendered list view
*/
public function listAction(Tx_CdgLabors_Domain_Model_Demand $demand = NULL, array $demandOverwrite = NULL) {
if (count($demandOverwrite)> 0) {