Skip to content

Instantly share code, notes, and snippets.

Avatar

Jens Martsch jmartsch

View GitHub Profile
@jmartsch
jmartsch / processwiresnippets.php
Created Jun 4, 2013
Common used code snippets for Processwire
View processwiresnippets.php
// First child redirect
<?php if($page->numChildren) $session->redirect($page->child()->url);
// Redirect to specific page
$session->redirect($pages->get('/')->url);
// Create a menu, needs MarkupSimpleNavigation Plugin
<?php
$treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module
$rootPage = $pages->get("/ueber-uns/"); // if you want to overwrite start level for the menu, for example for breadcrumbs
@jmartsch
jmartsch / dabblet.css
Created Mar 20, 2013
Pure CSS Tooltips with unicode arrow and shadow
View dabblet.css
/*
* Pure CSS Tooltips with unicode arrow and shadow
*/
.ui-tooltip, .ui-tooltip-top, .ui-tooltip-right, .ui-tooltip-bottom, .ui-tooltip-left {
color:#ffffff;
cursor:normal;
display:-moz-inline-stack;
display:inline-block;
font-size:12px;
font-family:arial;