Skip to content

Instantly share code, notes, and snippets.

View goldhat's full-sized avatar

Joel Milne goldhat

View GitHub Profile
@goldhat
goldhat / gist:562acab85b0b1fd9b662
Created September 29, 2014 09:57
Git Store Credentials
git config --global credential.helper 'cache --timeout 3600'
use \Concrete\Core\Page\PageList;
$pageList = new PageList();
$pageList->filterByPageTypeHandle('product');
$pages = $pageList->getResults();
<razor>
<catalogs>
<catalog>
<name>Catalog Name</name>
<path>/path</path>
</catalog>
</catalogs>
</razor>
@goldhat
goldhat / gist:f2cd0e817376d6bcdf16
Last active August 29, 2015 14:19
Catalog Import XML Format
<razor>
<catalogs>
<catalog>
<name>Catalog One</name>
<path>/catalog-one</path>
</catalog>
<catalog>
<name>Catalog Two</name>
<path>/catalog-one/catalog-two</path>
</catalog>
@goldhat
goldhat / page_list_template.php
Created January 9, 2014 00:16
Concrete5 Page List template that loads all blocks from the pages in the list and displays them.
defined('C5_EXECUTE') or die("Access Denied.");
$rssUrl = $showRss ? $controller->getRssUrl($b) : '';
$th = Loader::helper('text');
//$ih = Loader::helper('image'); //<--uncomment this line if displaying image attributes (see below)
//$dh = Loader::helper('date'); //<--uncomment this line if displaying dates (see below)
//Note that $nh (navigation helper) is already loaded for us by the controller (for legacy reasons)
?>
<div class="sixteen columns ccm-page-list testimonials">
@goldhat
goldhat / Template Registry Minimal
Last active May 15, 2016 10:55
ACF Render template registry array examples for the filter acf-render-template-register
'color' => array(
'field_types' => array('color'),
),
@goldhat
goldhat / text.txt
Last active October 1, 2016 22:42
ACF Render Shortcode Examples
[acf-render name="first_name"]
Basic example rendering a text field value. Field name is "first_name". Default template (text) will be used to render. No label will be shown.
[acf-render name="first_name" label=1]
Default template (text) will be used, Field label will be shown.
[acf-render name="first_name" post="89"]
Load the value of first_name field from post ID 89.
[acf-render name="first_name" template="custom-text"]
@goldhat
goldhat / general.txt
Created October 1, 2016 22:42
ACF Render Shortcode General Example
[acf-render name="first_name" post="123" template="text"]
@goldhat
goldhat / gist:94e0e782ce8c126b55a78750b80de8d6
Created October 1, 2016 22:47
ACF Render Shortcode Example - minimal
[acf-render name="my-field"]
@goldhat
goldhat / acf-render-template-wrapper-class
Created October 2, 2016 00:05
ACF Render Template Wrapper Classes
<div class="acf-template acf-template-text">