Skip to content

Instantly share code, notes, and snippets.

Avatar

Claus Due NamelessCoder

View GitHub Profile
View Solarized Dark.icls
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Solarized Dark" version="124" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<font>
<option name="EDITOR_FONT_NAME" value="SourceCodePro-Regular" />
<option name="EDITOR_FONT_SIZE" value="13" />
</font>
<font>
<option name="EDITOR_FONT_NAME" value="Monaco" />
<option name="EDITOR_FONT_SIZE" value="13" />
View gist:7267604
/**
* ## FooBar ViewHelper
*
* Blabla
*
* ### Argument: foo
*
* See: https://raw.github.com/bla/bla.md
*
* ### Argument: barFromParent
View gist:7283729
<?php
/***************************************************************
* Copyright notice
*
* (c) 2011 Claus Due <claus@wildside.dk>, Wildside A/S
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
View ContentElementDefinitionProvider.php
<?php
/**
* Content Element Definition Provider
*
* Contains methods to either remove/change or add
* content definitions to the new content wizard
* and content type selectors.
*
* Same instance is used for removing and adding
View gist:92b9a74b5c0f81b34ddcc42826614442
<?php
$test = new ArrayIterator(array(1, 2, 3));
$exec = [];
foreach ($test as $l1) {
$exec[] = 'outer ' . $l1;
foreach ($test as $l2) {
$exec[] = 'inner' . $l2;
}
@NamelessCoder
NamelessCoder / install_typo3_62_ft3.sh
Last active Jan 13, 2017
Bash script to install TYPO3 6.2 LTS (dev) and FluidTYPO3 extensions (dev)
View install_typo3_62_ft3.sh
#!/usr/bin/env bash
# phase one: core install
# Pro tip: edit the script and use this repository instead to try out the
# codename "Awesome Ocelot" project - which should be even faster than the
# bare 6.2 core: https://github.com/NamelessCoder/TYPO3.CMS.git
# Live demo of "Awesome Ocelot" is at http://staging.namelesscoder.net
git clone https://github.com/TYPO3/TYPO3.CMS.git --depth 1
@NamelessCoder
NamelessCoder / content-page-vision.md
Last active Jan 10, 2018
My vision for TYPO3 content/page integrations
View content-page-vision.md

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.

View GridTCA.md
@NamelessCoder
NamelessCoder / AdditionalConfiguration.php
Created Mar 12, 2017
Using namelesscoder/typo3-cms-multilevel-cache
View AdditionalConfiguration.php
<?php
/*
* Demonstrates how to configure `namelesscoder/typo3-cms-multilevel-cache` for
* added L1 (runtime) and L2 (memcached) caches on existing database-backed caches.
*
* Tip: if your site changes frequently, consider assigning a low expiration time
* on the "default_memcached" cache configuration.
*/
@NamelessCoder
NamelessCoder / Menu.html
Last active May 13, 2018
Rendering manual menus with VHS
View Menu.html
<div xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<!-- By setting the "as" argument, we create a new variable accessible inside tag content -->
<v:page.menu as="myMenuVariable">
<ol class="mySpecialMenu">
<f:for each="{myMenuVariable}" as="menuPage">
<li>
<!-- A few key properties are added on {menuPage} for user friendliness -->
<!-- These are: "linktext", "link", "active", "current", "hasSubPages" -->
<f:if condition="{menuPage.current}">