Created
January 14, 2015 04:34
-
-
Save sheadawson/8fba047a1f6f42e45697 to your computer and use it in GitHub Desktop.
SilverStripe Blocks - Basic ContentBlock example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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