Skip to content

Instantly share code, notes, and snippets.

View dannevang's full-sized avatar

Mathias Dannevang dannevang

View GitHub Profile
@dannevang
dannevang / new-products.xml
Created June 6, 2012 09:18 — forked from zeljkoprsa/new-products.xml
List New Products with toolbar (Grid/List, pagiantion the whole shebang )
<reference name="content">
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>8</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
</reference>
<?php
/*
simplx.dompdf
*/
$filename = isset($filename) ? $filename : false;
$outputto = isset($outputto) ? $outputto : 'file';
[[[[*page-image:notempty=`$wrapImgThumb? &src=`*page-image` &alt=`[[*pagetitle]]` &thumbOpts=`w=480&h=320``]]]]
@dannevang
dannevang / Full Height
Last active December 21, 2015 22:42 — forked from joanhard/index
Full height sidebar
<div class="row">
<div class="large-8 column">
My Content
</div>
<div class="large-4 column full-height">
<aside class="sidebar">
My Sidebar
</aside>
</div>
</div>
Snippet: [[SnippetName]]
Chunk: [[$ChunkName]]
System Setting: [[++SettingName]]
TV: [[*fieldName/TvName]]
Link tag: [[~PageId? &paramName=`value`]]
Placeholder: [[+PlaceholderName]]
<?php
<?php
$default = realpath(dirname(__FILE__).'/core/lexicon/en').'/';
$local = realpath(dirname(__FILE__).'/core/lexicon/nl').'/';
$showSame = false;
// find default files
$theFiles = array();
if($handle = opendir($default)) {
while(false !== ($file = readdir($handle))) {
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
<?php
/**
* =========================
* defaultTemplateByParentTv
* =========================
*
* Plugin for modX Revolution
* Set default template for children of a ressource
*
* Author:
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
@dannevang
dannevang / secure_install.sh
Last active August 29, 2015 14:18 — forked from Realetive/secure_install.sh
Install script for MODX
#!/bin/bash
##############
echo "
//////////////////////////////////////
// //
// Welcome to MODx autoinstaller. //
// //
//////////////////////////////////////