Skip to content

Instantly share code, notes, and snippets.

@bigtreecms
bigtreecms / Placeholder Format
Last active December 15, 2015 11:59
Placeholder image format
<?
// Generic
$palceholder = WWW_ROOT."images/placeholder/{height}x{width}";
// 500x500
$palceholder = WWW_ROOT."images/placeholder/500x500";
?>
@bigtreecms
bigtreecms / Subnavigation Structure
Last active December 15, 2015 04:59
Basic subnavigation loop.
<?
/*
Basic subnavigation loop.
-Draws 2 levels at a time
-Ignores top level (never re-draws main navigation)
-If page has children, draws page's siblings and subs
-If no children, draws parent's and page's siblings.
*/
$currentURL = BigTree::currentURL();
@bigtreecms
bigtreecms / Callout Structure
Last active December 15, 2015 04:59
Basic callout loop.
<?
/*
Basic callout loop.
-Includes callouts in order
*/
?>
<div class="callouts">
<?
foreach ($callouts as $callout) {
include "../templates/callouts/" . $callout["type"] . ".php";
@bigtreecms
bigtreecms / Breadcrumb Structure
Last active December 15, 2015 04:59
Basic breadcrumb loop.
<?
/*
Basic breadcrumb loop.
-Always draws home link
-Draws current page as static text
*/
$breadcrumb = $cms->getBreadcrumb();
$bcCount = count($breadcrumb);