Skip to content

Instantly share code, notes, and snippets.

@sheadawson
Created January 14, 2015 04:34
Show Gist options
  • Save sheadawson/8fba047a1f6f42e45697 to your computer and use it in GitHub Desktop.
Save sheadawson/8fba047a1f6f42e45697 to your computer and use it in GitHub Desktop.
SilverStripe Blocks - Basic ContentBlock example
<?php
class ContentBlock extends Block{
private static $singular_name = 'Content Block';
private static $plural_name = 'Content Blocks';
private static $db = array(
'Title' => 'Varchar(255)',
'Content' => 'HTMLText'
);
}
<div class='$CSSClasses'>
<div class='block_title'><h3>$Title</h3></div>
<div class='block_content'>$Content</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment