Skip to content

Instantly share code, notes, and snippets.

View dfeyer's full-sized avatar

Dominique Feyer dfeyer

View GitHub Profile
prototype(TYPO3.Neos:PrimaryContent).event {
condition = ${q(node).is('[instanceof Ttree.OfficialWebsite:Reference]')}
type = 'Ttree.OfficialWebsite:Reference'
}
@dfeyer
dfeyer / GoogleMap.html
Created October 18, 2013 19:50
A small snippet for Google Map integration in TYPO3 Neos, or any TYPO3 Flow project who use the Content Repository and TypoScript package
{namespace neos=TYPO3\Neos\ViewHelpers}
<neos:contentElement node="{node}">
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script>
<![CDATA[
function initializeMap]]>{node.name}<![CDATA[() {
var myLatlng = new google.maps.LatLng(]]>{longitude}<![CDATA[,]]>{latitude}<![CDATA[);
var mapOptions = {
zoom: ]]>{zoomlevel}<![CDATA[,
center: myLatlng,
@dfeyer
dfeyer / DocumentTeaser.ts2
Created October 29, 2013 12:03
TYPO3 Neos Document Teaser TS Object This TS object can be used to extract a teaser from a given page
# DocumentTeaser Implementation
#
prototype(Ttree.OfficialWebsite:DocumentTeaser) {
@class = 'Ttree\\OfficialWebsite\\TypoScript\\DocumentTeaserImplementation'
maximumCharacters = 600
suffix = '...'
documentNode = ${documentNode}
}
<?php
namespace TYPO3\TYPO3CR\Tests\Unit\Domain\Service;
/* *
* This script belongs to the TYPO3 Flow package "TYPO3.TYPO3CR". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License, either version 3 of the *
* License, or (at your option) any later version. *
* *
prototype(TYPO3.Neos:PrimaryContent).referenceProject {
condition = ${q(node).is('[instanceof Ttree.OfficialWebsite:ReferenceProject]')}
type = 'Ttree.OfficialWebsite:ReferenceProject'
@position = 'before referenceCustomer'
}
triggers:
eventNodeTypePublishedByMarketingTeam:
type: 'onBeforeNodePublishing'
condition:${q(node).is('[instanceof Ttree.Plugin:Event]') && q(user).hasRole('Ttree.Site:MarketingTeam')}
eventNodeTypeDeleted:
type: 'onNodeDeletion'
condition:${q(node).is('[instanceof Ttree.Plugin:Event]')}
actions:
# Base class for all "Plugins"; that are PHP controllers being called during the rendering.
'TYPO3.Neos:Plugin':
superTypes: ['TYPO3.Neos:Content']
abstract: TRUE
ui:
label: 'Plugin'
group: 'plugins'
icon: 'icon-puzzle-piece'
inspector:
groups:
@dfeyer
dfeyer / Settings.yaml
Created March 8, 2014 11:52
Change PHP extension used by TYPO3.Imaging to render image
# Use PHP GD php extension
TYPO3:
Imagine:
driver: 'Gd'
# Use PHP Gmagick php extension
TYPO3:
Imagine:
driver: 'Gmagick'
#!/bin/bash
EXIT_STATUS=0
echo "#!/bin/bash" > ./docker-travis-test.sh
cat .travis.yml | shyaml get-values before_script >> ./docker-travis-test.sh
cat .travis.yml | shyaml get-values script >> ./docker-travis-test.sh
PHP_VERSIONS=`cat .travis.yml | shyaml get-values php`
for PHP_VERSION in $PHP_VERSIONS
@dfeyer
dfeyer / Menu.ts2
Last active August 29, 2015 14:17
A simple menu in TypoScript2 for Neos
mainMenu = TYPO3.TypoScript:Menu {
templatePath = 'resource://Your.Package/Private/Templates/NodeTypes/Menu.html'
entryLevel = 1
maximumLevels = 1
active.attributes {
class = 'nav-link active'
id = 'navigation-menu'
role = 'navigation'