Skip to content

Instantly share code, notes, and snippets.

@stefanheimes
stefanheimes / Helper.php
Last active August 29, 2015 14:01
A helper class for building a breadcrumb for a given page alias.
<?php
/**
* Contao Open Source CMS
*
* @copyright MEN AT WORK 2014
* @package Helper
* @license GNU/LGPL
* @filesource
*/
@stefanheimes
stefanheimes / gist:7578782
Last active July 19, 2016 12:20
wf_extendedBreadcrumb - Add missing items like MetaModels/Isotope etc.
<?php
// MM
use MetaModels\Filter\Rules\SearchAttribute as MetaModelFilterRuleSearchAttribute;
use MetaModels\Filter\Setting\Factory as MetaModelFilterSettingsFactory;
// Isotope
use Isotope\Model\Product;
/**
* PHP version 5
@leofeyer
leofeyer / contao-db-update.php
Created August 9, 2012 13:04
Update path in database
<?php
// Database credentials
$strHost = 'localhost';
$strUser = '';
$strPassword = '';
$strDatabase = '';
// From and to path
$strFrom = 'tl_files/';
@twe4ked
twe4ked / input.scss
Created December 5, 2011 06:27
FREE! Sass (SCSS) mixin for including retina images (useful when developing for iOS).
@mixin background-image-retina($file, $type, $width, $height) {
background-image: url($file + '.' + $type);
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) {
& {
background-image: url($file + '@2x.' + $type);
-webkit-background-size: $width $height;
}
}
}