It still doesn't make any sense.
Whatever I try I get :
XML Parsing Error: not well-formed
Location: http://yoog.co.uk/new-playlistpage/
Line Number 101, Column 4:
Or something very similar.
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
It still doesn't make any sense.
Whatever I try I get :
XML Parsing Error: not well-formed
Location: http://yoog.co.uk/new-playlistpage/
Line Number 101, Column 4:
Or something very similar.
OK I have got what I needed now.
PlaylistPage.php:
<?php
/**
* Defines the Playlist page type
*/
class PlayListPage extends Page {
static $db = array(
);
static $has_one = array(
);
function getAList() { return "something returns but this is just a string for testing";}
function Content() { $content = $this->Content; $content = str_replace('[[aList]]', $this->getAList(), $content); return $content; }
}
class PlayListPage_Controller extends Page_Controller {
}
?>
Now I can put [[aList]] in the content box in the CMS and I get the test text comes back in the editor. This is what I needed. I have to think about my editors. :)
Thanks for your help guys.
XML Parsing Error: not well-formed
Location: http://yoog.co.uk/new-playlistpage/
Line Number 101, Column 4:
Watch out for that. The default theme sends the html as pure xml which is picky. You can disable it (and avoid errors like this) http://doc.silverstripe.com/doku.php?id=contentnegotiator
It seems so simple once it's done. I suppose it's just getting used to a different way of doing things!
Thanks again.