Skip to content

Instantly share code, notes, and snippets.

@muskie9
Created May 11, 2015 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muskie9/8321f6496a9bddd0be2b to your computer and use it in GitHub Desktop.
Save muskie9/8321f6496a9bddd0be2b to your computer and use it in GitHub Desktop.
<?php
class NestProduct extends ProductPage{
private static $singular_name = 'Product';
private static $plural_name = 'Products';
private static $description = 'Product for Nest Home Store';
private static $hide_ancestor = 'ProductPage';
private static $can_be_root = false;
private static $db = array();
private static $has_one = array();
private static $has_many = array();
private static $many_many = array();
private static $many_many_extraFields = array();
private static $belongs_many_many = array();
private static $defaults = array();
public function getCMSFields(){
$fields = parent::getCMSFields();
$this->extend('updateCMSFields', $fields);
return $fields;
}
public function flexSliderBeforeAction(){
$function = "function(slider){
var slide = slider.animatingTo;
slide++;
$('.flex-copy').removeClass('active-copy');
var copyToShow = '#slide-copy-'+slide;
$(copyToShow).addClass('active-copy');
}";
return $function;
}
}
class NestProduct_Controller extends ProductPage_Controller{
public function init(){
parent::init();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment