mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed example to work when copied and pasted.
Original example gives: Fatal error: Using $this when not in object context in E:\localhost\abscreensavers.com\mysite\code\Page.php on line 19
This commit is contained in:
parent
d9436675a1
commit
eeef72e653
@ -57,7 +57,7 @@ First we need to define a callback for the shortcode.
|
||||
);
|
||||
|
||||
public function MyShortCodeMethod($arguments, $content = null, $parser = null, $tagName) {
|
||||
return str_replace($content, "<em>$content</em>", $this->Content);
|
||||
return "<em>" . $tagName . "</em> " . $content . "; " . count($arguments) . " arguments.";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user