Skip to content

Instantly share code, notes, and snippets.

@christian-fries
Created September 9, 2015 15:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christian-fries/70f6cf1b9d2f0f8ca380 to your computer and use it in GitHub Desktop.
Save christian-fries/70f6cf1b9d2f0f8ca380 to your computer and use it in GitHub Desktop.
Neos 2.0 ContentCollection without wrapping DIV tag (div.neos-contentcollection)
prototype(TYPO3.Neos:ContentCollection) {
@class = 'ACME\\SitePackage\\TypoScriptObjects\\TagImplementation'
}
// In the Root.ts2 of your site package, include the custom ContentCollection prototype
include: ContentCollection.ts2
// Your template typoscript here
<?php
namespace ACME\SitePackage\TypoScriptObjects;
/* *
* This script belongs to the TYPO3 Flow package "TYPO3.TypoScript". *
* *
* 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. *
* *
* The TYPO3 project - inspiring people to share! *
* */
use TYPO3\Flow\Annotations as Flow;
/**
* Return only content, don't render tag
*/
class TagImplementation extends \TYPO3\TypoScript\TypoScriptObjects\TagImplementation {
/**
* Return content without tag
*
* @return mixed
*/
public function evaluate() {
return $this->tsValue('content');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment