Skip to content

Instantly share code, notes, and snippets.

@vdchristelle
vdchristelle / template.php
Created September 9, 2013 07:00
GoogleAnalytics data komt niet binnen Opmerking van beneden, de Marketeers komen dikwijls tot de vaststelling dat de GA module niet werkt. Eén van de oorzaken kan onderstaand stukje code zijn: Dit stukje komt uit het template.php bestand in het basetheme. De 2 lijnen die in commentaar staan moeten ook in commentaar blijven. Fitnesspecialist was …
function basetheme_preprocess_html(&$vars) {
$vars['theme_folder'] = base_path() . path_to_theme();
// Function to cleanup html source a bit more
function indent($string) {
$spacing = " ";
$string = ltrim(str_replace('<link', $spacing . '<link', $string));
$string = ltrim(str_replace('<meta', $spacing . '<meta', $string));
$string = ltrim(str_replace('<script', $spacing . '<script', $string));
@vdchristelle
vdchristelle / page.tpl.php
Last active December 22, 2015 10:48
Ability to set linebreak in $h1_title Titel splitsen
<h1><?php print str_replace('[', '<span>', str_replace(']', '</span>', $h1_title)); ?></h1>
of <h1><?php print str_replace(array('[', ']'), array('<span>', '</span>'), $h1_title); ?></h1>