Skip to content

Instantly share code, notes, and snippets.

View stigfaerch's full-sized avatar

Stig Nørgaard Færch stigfaerch

View GitHub Profile
@stigfaerch
stigfaerch / gist:2056dc6591f9b9cad686
Created October 30, 2014 12:00
TYPO3 Neos - typoscript - solution when this.property doesn't work
prototype(TYPO3.Neos.NodeTypes:Text) {
number = ${q(node).property('number')}
@override.number = ${this.number}
#override makes it possible to insert number to class - as this.number wouldn't work here:
attributes.class.@process.addNumber = ${value + ' number-' + number}
}
@stigfaerch
stigfaerch / gist:16d22bc1c8c56011d86d
Created January 28, 2016 09:13
TYPO3 Fluid ViewHelper - StringContains
<?php
name SOME\NAMESPACE;
class StringContainsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
/**
* Returns true depending on $needle in $haystack and which mode is chosen
* @param string $haystack
* @param string $needle
* @param string $mode - contains, beginsWith, endsWith
@stigfaerch
stigfaerch / gist:8756668fbfbfa4d3c29be8f12ef6b9c7
Last active August 3, 2018 08:16
Box.com DAV - curl - create folder, upload/download file
#create folder
curl -u me@email.com:mypassword -X MKCOL "https://dav.box.com/dav/remote_foldername"
#upload
curl -u me@email.com:mypassword -T local_file_path https://dav.box.com/dav/remote_file_name
#download
curl -u me@email.com:mypassword https://dav.box.com/dav/remote_file_name --output download_file_path
@stigfaerch
stigfaerch / composer autoload custom extension
Last active August 22, 2018 13:43 — forked from t3easy/README.md
Non composer extension insight composer mode TYPO3
1. Copy your extension to `[web/]typo3conf/ext/` of your composer mode TYPO3 (or kickstart one with extension_builder).
2. Add autoload entry to your root composer.json (that one which requires "typo3/cms")
```json
"autoload": {
"psr-4": {
"T3easy\\MyExt\\": "web/typo3conf/ext/my_ext/Classes/"
}
}
```
3. Run `composer dump-autoload -a` to update the autoloader.
@stigfaerch
stigfaerch / Header.html
Created September 12, 2019 12:56
TYPO3 with fluid_styled_template - Implement defaultHeaderType from registers
--- public/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html (date 1566293615000)
+++ public/typo3/sysext/fluid_styled_content/Resources/Private/Partials/Header/Header.html (date 1566293615000)
@@ -38,7 +38,7 @@
<f:if condition="{default}">
<f:render partial="Header/Header" arguments="{
header: header,
- layout: default,
+ layout: '{f:cObject(typoscriptObjectPath:\'lib.contentElement.cObjects.defaultHeaderType\')}',
positionClass: positionClass,
link: link}" />