Skip to content

Instantly share code, notes, and snippets.

View fritzmg's full-sized avatar

Fritz Michael Gschwantner fritzmg

View GitHub Profile
@fritzmg
fritzmg / nav_switch.html5
Created July 13, 2015 10:26
Contao nav_default Template, which allows you to switch to the same subpage within a different "category". Simply create a new custom navigation module, select the pages that act as "category roots" and assign this template. You also need to use folder URLs and the page aliases must be the same (except for the first part, i.e. the "category").
<?php global $objPage; ?>
<ul class="<?= $this->level ?>" role="<?= ($this->level == 'level_1') ? 'menubar' : 'menu' ?>">
<?php foreach ($this->items as $item): ?>
<?php
// get the current page's alias and remove its first part
$arrAlias = explode('/', $objPage->alias);
array_shift($arrAlias);
@fritzmg
fritzmg / filetags.php
Created July 9, 2015 07:51
Replaces file paths like "files/lorem/ipsum/foo.jpg" in Contao text elements with {{file::…}} insert tags.
<?php
/**
* Contao Open Source CMS
*
* Copyright (c) 2005-2015 Leo Feyer
*
* @license LGPL-3.0+
*/
@fritzmg
fritzmg / www_klack_de.xml
Last active December 23, 2015 12:40
UPDATE: Use http://pastebin.com/dd45TDZY instead || MediaPortal WebEPG grabber file for klack.de
<?xml version="1.0" encoding="utf-8"?>
<Grabber>
<Info language="de" availableDays="14" timezone="W. Europe Standard Time" version="2.1.0" />
<Channels>
<Channel id="13TH STREET Universal" siteId="112" />
<Channel id="3sat" siteId="1" />
<Channel id="Animal Planet" siteId="73" />
<Channel id="Animax" siteId="171" />
<Channel id="ANIXE HD" siteId="4" />
<Channel id="ARTE" siteId="6" />