Skip to content

Instantly share code, notes, and snippets.

View t3easy's full-sized avatar
💭
Busy but happy!

Jan Kiesewetter t3easy

💭
Busy but happy!
View GitHub Profile
class Tx_Extension_Controller_ModelController extends Tx_Extbase_MVC_Controller_ActionController {
/**
* action list
*
* @return void
*/
public function listAction() {
$GLOBALS['TSFE']->getPageRenderer()->addJsFooterFile(
t3lib_extMgm::siteRelPath('extensionkey') . 'Resources/Public/JavaScript/foo.js'
@t3easy
t3easy / lib.sf-menu.txt
Created July 17, 2013 14:36
superfish menu for TYPO3
#page.includeCSS.1353257182 = {$paths.public}/Css/superfish.css
page.includeJSFooterlibs.jquery = http://code.jquery.com/jquery.min.js
page.includeJSFooterlibs.jquery.external = 1
page.includeJSFooter.1353257182 = {$paths.public}/Js/superfish.js
page.jsFooterInline.1353257182 = TEXT
page.jsFooterInline.1353257182.wrap = $(document).ready(function() {|});
page.jsFooterInline.1353257182.value = $('ul.sf-menu').superfish();
@t3easy
t3easy / .htaccess
Created September 13, 2013 08:35
adaptive-images TYPO3
<IfModule mod_rewrite.c>
# Enable URL rewriting
RewriteEngine On
# Adaptive Images -----------------------------------------------------------------------------------
# Add any directories you wish to omit from the Adaptive-Images process on a new line, as follows:
RewriteCond %{REQUEST_URI} !^/ai-cache/
RewriteCond %{REQUEST_URI} !^/typo3/
@t3easy
t3easy / update
Last active December 31, 2015 12:09
#!/bin/sh
composer require --no-update "typo3/neos:1.1.*"
composer require --no-update "typo3/neos-nodetypes:1.1.*"
composer require --no-update "typo3/neosdemotypo3org:1.1.*"
composer require --no-update "typo3/neos-kickstarter:1.1.*"
composer require --no-update "typo3/buildessentials:2.2.*"
composer update
lib.requireJsModule = TEXT
lib.requireJsModule {
insertData = 1
append = TEXT
append.char = 32
prepend < .append
}
lib.requireJs = COA
lib.requireJs {
#!/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
lib.pageCategories = CONTENT
lib.pageCategories {
wrap = <ul>|</ul>
table = pages
select {
uidInList = this
pidInList = 0
selectFields = sys_category.title
join = sys_category_record_mm ON pages.uid = sys_category_record_mm.uid_foreign JOIN sys_category ON sys_category.uid = sys_category_record_mm.uid_local
where = sys_category_record_mm.tablenames = 'pages'
20 = HMENU
20 {
special = categories
special.value = 2
1 = TMENU
1 {
wrap = <ul>|</ul>
NO {
// Start scroll
function scrollToAnchor(hash, duration) {
var target = $(hash), header, scrollTop = 0;
target = target.length > 0 ? target : $('[name=' + hash.slice(1) +']');
if (target.length > 0) {
header = $('#header');
scrollTop = target.offset().top;
if (target.attr('id') !== 'top' && header.length > 0 && header.css('position') === 'fixed'){
scrollTop = scrollTop - header.height();
}
page.headerData {
# Apple touch icons
1424098000 = COA
1424098000 {
# iPhone
10 = IMAGE
10 {
file = EXT:mypackage/Resources/Public/Images/apple-touch-icon.png
file.width = 60
file.height = 60