Skip to content

Instantly share code, notes, and snippets.

@ABooooo
ABooooo / new_gist_file.ts
Created September 22, 2017 11:38
MASK - get image path
// compare with autogenerated code
<div class="boxContent" style="background-image: url(
<f:if condition="{data_item.tx_mask_bgimage}">
<f:for each="{data_item.tx_mask_bgimage}" as="file">
<f:uri.image src="{file.publicUrl}" />
</f:for>
</f:if>
@ABooooo
ABooooo / new_gist_file_0
Created November 27, 2017 12:04
if then elseif else
Since TYPO3 8LTS
Since version 8 TYPO3 uses the standalone version of fluid, that was heavily developed and got tons of new features like elseif:
<f:if condition="{var} == 'something'">
<f:then>do something</f:then>
<f:else if="{other-var} == 'something else'">do something else</f:else>
<f:else>do the other thing</f:else>
</f:if>
In addition there is support for syntax like this:
In Extension Manager (EM) find the RealURL and set option Automatic configuration file format to PHP source (slow!) (with automatic conf still enabled!)
Remove the file typo3conf/realurl_autoconf.php (as far as I remember), clear all caches and refresh the main page, the autoconf file will be recreated in unserialized version.
Rename the file to typo3conf/realurl_conf.php, go to EM again and uncheck the automatic configuration option.
After clearing the caches and you'll be switched to manual config built from the automatic one.
1. https://docs.acquia.com/lightning/install/local/
2. https://gist.github.com/criscom/d973ea5e4328bf8aab39857ecf93b075
#Install lightning
composer create-project acquia/lightning-project MY_PROJECT --no-interaction
open with browser MY_PROJECT/docroot
install Drupal
#error execution time
https://www.drupal.org/forum/support/installing-drupal/2014-01-22/maximum-execution-time-of-30-seconds-exceeded-in-drupal
https://gist.github.com/Metaviolet/682c8d3b05a3a01fd598
//First declare breakpoints
$breakpoints: (
'small': 767px,
'medium': 992px,
'large': 1200px
) !default;
/// Mixin to manage responsive breakpoints
<?php echo get_template_directory_uri(); ?>
@ABooooo
ABooooo / addingwidgets
Created January 9, 2019 14:50
Dynamically Adding Four Footer Widget Areas
https://code.tutsplus.com/tutorials/dynamically-adding-four-footer-widget-areas--cms-22168
// register sidebar in functions
function alle_sprachen_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'alle_sprachen' ),
'id' => 'sidebar-1',
'description' => esc_html__( 'Add widgets here.', 'alle_sprachen' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
// Register Sidebar
function alle_sprachen_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Header-Hero', 'alle_sprachen' ),
'id' => 'header_hero',
'description' => esc_html__( 'Add widgets here.', 'alle_sprachen' ),
'before_widget' => '<section id="%1$s" class="widget %2$s">',
'after_widget' => '</section>',
'before_title' => '<h2 class="widget-title">',
// get page ID with objct post
$custompageid = get_field('anfrageseite_id', 'option'); // 'options' is standard value!!!