Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Will this work in new page type?

Go to End



Community Member, 20 Posts

2 February 2012 at 1:25am

1 create new page type called HomePage.php in mysite/code

2 Make content below line 11 "class Page_Controller extends ContentController" the same as Page.php

3 Create file called in themes/mytheme/templates

4 Make this file an exact copy of

5 Create file called in themes/mytheme/templates/includes

6 Put all page content that should appear between <body> </body> tags into this file (excluding <body> </body> tags

7 Edit by adding

<div id="customcontent">
<% include customcontent %>

at line 39 immediately after

<div id="Layout">

and just before

<div class="clear"><!-- --></div>

I have several questions:

1 Will this work and display the html content from themes/mytheme/templates/includes/ without wysiwyg editor changing tags

2 Does adding content this way create potential security issues

3 Will this have an impact on the way search engine spiders see my site and have a negative impact on seo

WHY do I want to do this I hear you cry. Basically the only way to use <script> tags in silverstripe is to find a way to bypass wysiwig editor.

thanks in advance