Skip to content

Instantly share code, notes, and snippets.

View NamelessCoder's full-sized avatar

Claus Due NamelessCoder

View GitHub Profile
@NamelessCoder
NamelessCoder / content-page-vision.md
Last active January 10, 2018 08:04
My vision for TYPO3 content/page integrations

My vision for TYPO3 content/page integrations

Estimated 15 minute read

Continuing from my vision for Fluid I'd like to describe another vision related to it. Where the first article is mainly about what we could do with the Fluid template engine outside of TYPO3, this article focuses on what we can do with it in TYPO3. It assumes the previous vision was realised.

The vision can be summarised as follows:

We should have a way to drop-in replace and add content templates, instead of requiring massive amounts of boilerplate configuration/code. And we should have a method for managing nested content which is provided by the core itself.

5. It's a jungle up there

So now we have no shipped preferentially treated extensions and we lack some way of distributing these. We already have TER and it works wonderfully (but could use a performance checkup). But what TER doesn't have is an official way to indicate that an extension is worth while; a favourite of the community proven to add value. Twitter has the "verified" badge, Apple's App store has the "Featured Apps". TER has a download count and graph which by the way lacks a time scale.

Why don't we introduce a "recommended" and/or "official" flag on TER? Allow such extensions to be listed specially. Raise them as top priority for suggestions. Ship the core extensions from our Swiss army knife as "official" extensions. And let the community decide which ones will get that distinction; not some arbitrary number hits from an Apache log (sincerely, no offence! I realise exactly why the solution is the way it is and I respect it! I only wish to make it better).

There's another perspective here.

@NamelessCoder
NamelessCoder / fluid-vision.md
Created June 11, 2015 23:34
My vision for Fluid

My vision for Fluid

Estimated 15-20 minute read. Many perspectives included.

As some of you know: a while back I created a standalone version of the Fluid template engine and started banging the Twitter drums a bit about it. Since then, I have begun work on making this standalone version of Fluid a proper composer dependency of TYPO3. While this may not seem like a high priority task, it has far reaching implications in the vision I have for the future of Fluid.

Right from the start the goal has been not just to decouple Fluid from TYPO3/Flow - it has just as much been about extending and modernising the base Fluid so many, many adaptations become possible without modifying the engine itself. Humble brag: I spent a great amount of effort on making these things possible and the result is that by modifying implementations of classes that Fluid uses, one is able to modify nearly every aspect of how Fluid is processed - down to which arguments a ViewHelper supports and adding virtual

<f:if condition="0" else="0 === FALSE" />
<f:if condition="1" then="1 === TRUE" />
<f:if condition="(0)" else="(0) === FALSE" />
<f:if condition="(1)" then="(1) === TRUE" />
<f:if condition="0 && 0" else="0 && 0 === FALSE" />
<f:if condition="0 || 0" else="0 || 0 === FALSE" />
<f:if condition="1 && 0" else="1 && 0 === FALSE" />
<f:if condition="0 && 1" else="0 && 1 === FALSE" />
<f:if condition="1 || 0" then="1 || 0 === TRUE" />
<f:if condition="0 || 1" then="0 || 1 === TRUE" />

Introduction - please read!

I wrote this back in October of 2012 so please forgive those references to facts that are no longer relevant. I'd like to add that this isn't a personal attack although I realise (as I also state in the letter) that it is quite likely some may be offended. Offence is not my purpose here - I only have the community's best interests in mind although this letter is written as a personal opinion based on considerable experience.

Please accept it in the spirit it was written: for the common good.

plugin.tx_fluidbootstraptheme.view >
plugin.tx_fluidbootstraptheme.view.templateRootPaths.15 = EXT:fluidbootstraptheme/Resources/Private/Templates/
plugin.tx_fluidbootstraptheme.view.overlays.fluidtypo3org.templateRootPath = EXT:fluidtypo3org/Resources/Private/Overrides/Templates/
plugin.tx_fluidbootstraptheme.view.partialRootPaths.10 = EXT:fluidbootstraptheme/Resources/Private/Partials/
plugin.tx_fluidbootstraptheme.view.layoutRootPaths.10 = EXT:fluidbootstraptheme/Resources/Private/Layouts/
# OR:
plugin.tx_fluidbootstraptheme.view >
plugin.tx_fluidbootstraptheme.view.templateRootPaths.10 = EXT:fluidbootstraptheme/Resources/Private/Templates/
$var = '...';
$var .= '...';
$var .= '...';
$var = '...' .
'...' .
'...';
{
"NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin:0000000018505d7f000000009d399b86": [
"Executing Git clone command: \/usr\/bin\/git clone --depth 1 --single-branch --branch 'master' 'https:\/\/github.com\/NamelessCoder\/uploadtesting' \/tmp\/4fc7d7786ecbee5cb123235e1223753337b4265c\/uploadtesting",
"Cloning into '\/tmp\/4fc7d7786ecbee5cb123235e1223753337b4265c\/uploadtesting'..."
],
"NamelessCoder\\GizzleTYPO3Plugins\\GizzlePlugins\\ExtensionRepositoryReleasePlugin:0000000018505d7c000000009d399b86": {
"resultCode": "10504",
"resultMessages": [
"Please note that it might take a while (up to an hour) until your extension and the documentation appear on TYPO3.org."
],
@NamelessCoder
NamelessCoder / MyModel.php
Last active November 25, 2015 14:02
Example of using annotations to generate TCA configuration based on a Model class.
<?php
namespace FluidTYPO3\Demo\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* Domain Model: Simple entry with tag relations.
*
* The annotations on the class-level doc comment define
@NamelessCoder
NamelessCoder / Or.html
Created August 24, 2014 03:27
Usage of v:or for multiple else-style conditions
<div xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<!-- v:or can be used for long chains of conditions where the first
not-empty value gets used -->
<!-- If {person} for example can have three different email addresses'
but you only wish to display one of them: -->
Email: {person.workEmail -> v:or(alternative: person.secretaryEmail) -> v:or(alternative: person.homeEmail)}