18591 Posts in 4875 Topics by 2285 members
General Questions
SilverStripe Forums » General Questions » Will this work in new page type?
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 74 Views |
-
Will this work in new page type?

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 HomePage.ss in themes/mytheme/templates
4 Make this HomePage.ss file an exact copy of Page.ss
5 Create file called customContent.ss 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 HomePage.ss by adding
<div id="customcontent">
<% include customcontent %>
</div>at line 39 immediately after
<div id="Layout">
$Layout
</div>and just before
<div class="clear"><!-- --></div>
</div>I have several questions:
1 Will this work and display the html content from themes/mytheme/templates/includes/customcontent.ss 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
| 74 Views | ||
|
Page:
1
|
Go to Top |

