5098 Posts in 1518 Topics by 1115 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1688 Views |
-
How to render $Content without any template?

17 April 2009 at 1:47pm
Hi,
I created a new page type PlainPage and I would like to just render the content of the TinyMCE editor. I added the template /themes/mytheme/templates/PlainPage.ss with a simple
$Content
However, this strips out any DOCTYPE, <html> and <header> tags - but that already happens through TinyMCE.
Then I tried to add this to the PlainPage.ss code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
<head>
<title>$Title</title>
$MetaTags(false)
</head>
<body>
$Content
</body>
</html>It would be OK for my purposes to have this simple code, but then Silverstripe always adds a
<link rel="stylesheet" type="text/css" media="screen" href="http://etc ...
before the closing </head> tag. This comes from the Page.php init() function with lines likeRequirements::themedCSS("typography","screen");
How can I tell Silverstripe NOT to add this CSS information to the new page type? (But I need it in other page types.)
Cheers!
Anatol -
Re: How to render $Content without any template?

17 April 2009 at 2:19pm
function init() {
parent::init();
Requirements::clear();
}Having that in PlainPage_Controller should get rid of all those CSS files.
| 1688 Views | ||
|
Page:
1
|
Go to Top |
