Description
A Dashing widget for displaying the number of visitors to your website over a specified timeframe, as reported by Google Analytics
<?php | |
class MyDataObjectAdmin extends ModelAdmin { | |
private static $managed_models = array('MyDataObject'); // Can manage multiple models | |
private static $url_segment = 'my-data-object'; // Linked as /admin/my-data-object/ | |
private static $menu_title = 'My DataObjects'; | |
public function getSearchContext() { |
<?php | |
public function duplicate() { | |
$items_to_duplicate = array( | |
'Images', | |
'Somehting' | |
); | |
$page = parent::duplicate(); |
<?php | |
/** | |
* Configure SilverStripe using apache environment variables | |
* Usage: Put "require_once('conf/ConfigureFromEnv.php');" into your _config.php file. | |
* Example Apache vhost: | |
* <VirtualHost *:80> | |
* ... | |
* SetEnv SS_ENVIRONMENT_TYPE dev | |
* SetEnv SS_DEFAULT_ADMIN_USERNAME admin |
A Dashing widget for displaying the number of visitors to your website over a specified timeframe, as reported by Google Analytics
# My ./config directory in silverstripe looks like this: | |
# ./503.php <- a 503 Maintainance page | |
# ./_ss_environment.php <- the production environment settings | |
# ./deploy.rb <- is the recipe below | |
# | |
# Application settings | |
set :application, "domain.com" | |
set :shared_children, %w(assets) |
HtmlEditorConfig::get('cms')->setOptions(array( | |
"skin" => "default", | |
"style_formats" => array( | |
array( | |
"title" => "Lead", | |
"selector" => "p", | |
"classes" => "lead" | |
), | |
array( | |
"title" => "Subheader", |
<?php | |
/** | |
* Configure SilverStripe from the _ss_environment.php file. | |
* | |
* Edit this file and rename from _ss_environment.sample.php to _ss_environment.php. | |
* Put "require_once('conf/ConfigureFromEnv.php');" into your _config.php file. | |
* http://doc.silverstripe.org/framework/en/trunk/topics/environment-management | |
*/ |
{ | |
"name": "{{ YOUR NAMESPACE }}/{{ PACKAGE NAME }}", | |
"type": "{{ silverstripe-module}} || {{ silverstripe-theme}}", | |
"description": "SilverStripe", | |
"keywords": ["silverstripe", "keyword"], | |
"license": "BSD-3-Clause", | |
"authors": [{ | |
"name": "{{ AUTHOR NAME }}", | |
"homepage": "{{ AUTHOR WEBSITE }}" | |
}], |
//parameter or returns an empty string | |
jQuery.getURLParameter = function(name) { | |
return decodeURI( | |
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, ''])[1] | |
); | |
}; |
<?php | |
class MiniCart extends DataObjectDecorator { | |
... | |
public static function MiniCartItemShortcodeHandler($attributes, $content = null, $parser = null) { | |
if(empty($attributes['name']) || empty($attributes['price'])) { | |
return; |