Skip to content

Instantly share code, notes, and snippets.

<?php
namespace Acme\Package\TypoScript\FlowQueryOperations;
use TYPO3\Eel\FlowQuery\FlowQuery;
use TYPO3\Eel\FlowQuery\Operations\AbstractOperation;
use TYPO3\Flow\Annotations as Flow;
class MediaOperation extends AbstractOperation {
/**
root {
rss {
position = 'before format'
condition = ${request.parentRequest.uri.path == '/rss.xml'}
renderPath = '/rss'
}
@cache {
entryIdentifier {
path = ${request.parentRequest.uri.path}
}
@aertmann
aertmann / Live.php
Created February 5, 2015 14:00
Clear caches when deploying using Surf with custom cache backends
$workflow->defineTask('typo3.surf:shell:clearRedisCaches',
'typo3.surf:shell',
array('command' => 'cd {releasePath} && FLOW_CONTEXT=Production/Live ./flow cache:flushone TYPO3_TypoScript_Content && FLOW_CONTEXT=Production/Live ./flow cache:flushone Flow_Mvc_Routing_Resolve && FLOW_CONTEXT=Production/Live ./flow cache:flushone Flow_Mvc_Routing_Route')
);
$workflow->beforeStage('switch', array('typo3.surf:shell:clearRedisCaches'), $application);
@aertmann
aertmann / gist:822069d318febcbd65bd
Last active August 29, 2015 14:15
Pull from Gerrit mirror instead of git.typo3.org (temporary fix)
git config --global url."https://git.typo3.org".insteadOf git://git.typo3.org
@aertmann
aertmann / Latest.php
Last active August 29, 2015 14:16
Surf deployment script
<?php
use TYPO3\Surf\Domain\Model\Node;
use TYPO3\Surf\Domain\Model\SimpleWorkflow;
$application = new \TYPO3\Surf\Application\TYPO3\Flow();
$application->setOption('repositoryUrl', 'git@git.acme.com:Distributions/Acme');
$application->setOption('localPackagePath', FLOW_PATH_DATA . 'Checkout' . DIRECTORY_SEPARATOR . $deployment->getName() . DIRECTORY_SEPARATOR . 'Latest' . DIRECTORY_SEPARATOR);
$application->setOption('composerCommandPath', 'composer');
$application->setOption('transferMethod', 'rsync');
$application->setOption('rsyncFlags', '--recursive --times --perms --links --delete');
@aertmann
aertmann / NodeTypes.yaml
Created March 26, 2015 23:27
Meta description tag for pages in Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
'TYPO3.Neos.NodeTypes:Page':
ui:
inspector:
groups:
document:
label: 'Document'
position: 1
properties:
metaDescription:
type: string
-
name: 'Google Sitemap'
uriPattern: '{node}sitemap.xml'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'xml'
routeParts:
'node':
@aertmann
aertmann / .gitignore
Last active August 29, 2015 14:17
Optimize Neos/Flow frontend assets using Grunt – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
node_modules
@aertmann
aertmann / composer.json
Last active August 29, 2015 14:19
TYPO3 Neos 1.2 – reset composer.json to avoid pulling in unstable versions of some sub dependency packages
{
"name": "typo3/neos-base-distribution",
"description": "TYPO3 Neos Base Distribution",
"license": "GPL-3.0+",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"typo3/neos": "1.2.*",
@aertmann
aertmann / overview.md
Created May 11, 2015 12:14
Neos 2.0 / Flow 3.0 feature overview
  • Google Analytics package – Display analytics data in the inspector for every page
  • Inspector data views – display tables, graphs etc. in the inspector using data views (used for the GA package)
  • SEO package – Official package with basic SEO features
  • ACLs
    • More flexibility
    • Constrain certain node paths
    • Frontend login now possible
  • Multi-site
    • Module improvements
  • Default asset collection for a site