<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>I'm Learning SilverStripe</title>
		<link>http://www.sslearn.info/sslearn/knowledge-share/</link>
		<atom:link href="http://www.sslearn.info/sslearn/knowledge-share/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Silverstripe Template Engine</title>
			<link>http://www.sslearn.info/sslearn/silverstripe-template-engine/</link>
			<description>&lt;p&gt;MVC on the silverstripe named Sapphire has provided a template engine. This template engine can be easily combined with its controllers. As I discuss in the article &lt;a href=&quot;http://www.sslearn.info/sslearn/knowing-silverstripe-mvc/&quot; title=&quot;Knowing Silverstripe MVC&quot;&gt;Knowing Silverstripe MVC&lt;/a&gt;, a page type on the silverstripe will have .ss template file&amp;nbsp; which contains only the HTML syntax. The .ss file names will be same as the file name of his controllers. So Page.php controllers will have template files Page.ss, and so also for the other files. With this method, programmers and web designers can work with a consistent.&lt;/p&gt;
&lt;p&gt;Among the HTML code contained in the .ss file, there are some special characters that will be used by the template engine to insert a data object to a page that will be displayed in the browser. The process of looping and conditions can also easily done. Silverstripe also provides the control and the default variable to help facilitate the designer to create a template.&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;Variables&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Variables will call the method or field of objects with scalar value. Output is converted into a string for display on the template. Each variable will be preceded with the character $. variables are already available by default on a page of which is $Content, $Title, $MenuTitle, $Link, etc..&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&amp;lt;h2&amp;gt;$Title&amp;lt;/h2&amp;gt;&lt;br /&gt;$Content&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre&gt;&amp;lt;h2&amp;gt;Home&amp;lt;/h2&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;Welcome to &amp;lt;strong&amp;gt;I'm Learning Silverstripe&amp;lt;/strong&amp;gt;, this site contains about how to create web sites using &amp;lt;a target=&quot;_blank&quot; href=&quot;http://www.silverstripe.org&quot;&amp;gt;Silverstripe CMS&amp;lt;/a&amp;gt;. On this website you will find lots of information about how to use and develop the site made with silverstripe. Everything is based on the experiences suffered by post authors.&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;Controllers&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Controls on silverstripe is a method of a class that ends with _Controller. On file .ss control can be called with the syntax:&lt;/p&gt;
&lt;p&gt;&amp;lt;% control [name of control] %&amp;gt;&lt;br /&gt;....&lt;br /&gt;&amp;lt;% end_control %&amp;gt;&lt;/p&gt;
&lt;p&gt;The output of the control will be a collection of object (an array of object) then later produced a loop of the contents of the object. In silverstripe already have some controls that can be directly used. Like Menu, Children, Level, etc..&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% control Menu %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;rdquo;$Link&amp;rdquo;&amp;gt;$MenuTitle &amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% end_control %&amp;gt; &lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;rdquo;home&amp;rdquo;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;rdquo;about&amp;rdquo;&amp;gt;About&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;li&amp;gt;&amp;lt;a href=&amp;rdquo;contact&amp;rdquo;&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;Conditions&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Selection conditions can also be done by the silverstripe template engine using IF blocks. Some of the following syntax:&lt;/p&gt;
&lt;pre&gt;&amp;lt;% if condition %&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;% else_if&amp;nbsp; condition %&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;% else %&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;% end_if %&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;IF Block preceded by the &lt;strong&gt;&amp;lt;% if condition %&amp;gt;&lt;/strong&gt; and terminated by &lt;strong&gt;&amp;lt;% end_if %&amp;gt;&lt;/strong&gt;. In this block if there is a section &lt;strong&gt;&amp;lt;% if&lt;/strong&gt; that can determine the conditions we want. Part &lt;strong&gt;&amp;lt;% else_if&lt;/strong&gt; offer an alternative if the block &lt;strong&gt;&amp;lt;% if&lt;/strong&gt; not met. else_if are optional, can consist of one, several or none at all. For the &lt;strong&gt;&amp;lt;% else %&amp;gt;&lt;/strong&gt; is a condition in which all the conditions if and else_if not be met, the else block is also optional.&lt;/p&gt;
&lt;p&gt;For the condition element can contain a single variable/control or accompanied by logic == or != And alseo can be combined with logic &amp;amp;&amp;amp; (and) and || (or).&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&amp;lt;% if ClassName==Article %&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt; $Title &amp;ndash; [My Article] &amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;% else %&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt; $Title &amp;ndash; [My Page] &amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;% end_if %&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;h4&gt;&lt;strong&gt;Other Controls/Variables&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Silverstripe also bring the control or other variables that are available and can be used to assist designers in making the page templates.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;$ThemeDir&lt;/strong&gt;&lt;br /&gt;This variable is used to give the output path to the directory of themes that are used. For example we're using sslearn directory, so if we write:&lt;br /&gt;
&lt;pre&gt;&amp;lt;img src=&amp;rdquo;$ThemeDir/images/logo.png&amp;rdquo; /&amp;gt;&lt;/pre&gt;
The result will be:&lt;br /&gt;
&lt;pre&gt;&amp;lt;img src=&amp;rdquo;themes/sslearn/images/logo.png&amp;rdquo; /&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;lt;% base_tag %&amp;gt;&lt;/strong&gt;&lt;br /&gt;This control is used to provide output &amp;lt;base&amp;gt; tag that was used to determine the href of a page. Designers can use this without having to think about a domain name or URL that will be used from the web.&lt;br /&gt;Example:&lt;br /&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;&lt;br /&gt;	&amp;lt;head&amp;gt;&lt;br /&gt;	&amp;lt;% base_tag %&amp;gt;&lt;br /&gt;	&amp;lt;title&amp;gt;&lt;br /&gt;	....&lt;br /&gt;&lt;/pre&gt;
The results are:&lt;br /&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;&lt;br /&gt;	&amp;lt;head&amp;gt;&lt;br /&gt;	&amp;lt;base href=&amp;rdquo;http://localhost/sslearn/&amp;rdquo;&amp;gt;&lt;br /&gt;	&amp;lt;title&amp;gt;&lt;br /&gt;	...&lt;br /&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;$Breadcrumbs&lt;br /&gt;Breadcrumbs are used to display hierarchical navigation of the web. By using breadcrumbs will display the current position of pages viewed by users. Users also get the information hierarchy of the page. For example, if we are on page called sub-menu of whic is the child from the Home, then if we write:&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;lt;div class=&amp;rdquo;Breadcrumbs&amp;rdquo;&amp;gt;$Breadcrumbs&amp;lt;/div&amp;gt;&lt;/pre&gt;
then the result is:&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&amp;lt;div class=&amp;rdquo;Breadcrumbs&amp;rdquo;&amp;gt;&amp;lt;a href=&amp;rdquo;/&amp;rdquo;&amp;gt;Home&amp;lt;/a&amp;gt; &amp;amp;raquo; Sub Menu&amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Besides Control and variables I mentioned above, in fact there are many variables and other controls that can be used&amp;nbsp; in silverstripe. You can read the documentation in silverstripe home page at &lt;a href=&quot;http://doc.silverstripe.org/doku.php?id=templates&quot; target=&quot;_blank&quot; title=&quot;templates [SilverStripe Documentation]&quot;&gt;http://doc.silverstripe.org/doku.php?id=templates&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
			<pubDate>Fri, 19 Mar 2010 22:07:17 -0500</pubDate>
			
			<guid>http://www.sslearn.info/sslearn/silverstripe-template-engine/</guid>
		</item>
		
		<item>
			<title>What is Silverstripe?</title>
			<link>http://www.sslearn.info/sslearn/what-is-silverstripe/</link>
			<description>&lt;p&gt;&lt;a href=&quot;http://www.silverstripe.org/&quot; target=&quot;_blank&quot;&gt;Silverstripe&lt;/a&gt; is a free framework and &lt;a href=&quot;http://en.wikipedia.org/wiki/Content_management_system&quot; target=&quot;_blank&quot;&gt;content management system&lt;/a&gt; (&lt;a href=&quot;http://en.wikipedia.org/wiki/Open_source&quot; target=&quot;_blank&quot;&gt;open source&lt;/a&gt;), which can be used to manage a website. CMS to provide silvestripe an ease in managing the website. Each end user does not need to have the ability in the use of HTML. So it is easy to use.&lt;/p&gt;
&lt;p&gt;Silverstripe has a development &lt;a href=&quot;http://www.sslearn.info/sslearn/knowing-silverstripe-mvc/&quot;&gt;Model View Controller&lt;/a&gt; framework called Sapphire. Sapphire written using &lt;a href=&quot;http://www.php.net&quot; target=&quot;_blank&quot;&gt;PHP5&lt;/a&gt; language, with this MVC any website developers can also easily modify the functionality of the web, including with its CMS control panel pages. Silverstripe also provides full control of the HTML page generation, database design, forms, etc. With this control developers can avoid the mistakes typing html syntax, creating databases, forms, etc.&lt;br /&gt;&lt;br /&gt;Silverstripe issued with BSD License. For documentation there was an online documentation for users and developers and also the complete guide to silvertripe book was released in August 2009. Silverstripe demo can be viewed through the video or try the demo at &lt;a href=&quot;http://demo.silverstripe.com/&quot; target=&quot;_blank&quot;&gt;http://demo.silverstripe.com/&lt;/a&gt;.&lt;/p&gt;</description>
			<pubDate></pubDate>
			
			
			<guid>http://www.sslearn.info/sslearn/what-is-silverstripe/</guid>
		</item>
		
		<item>
			<title>Knowing Silverstripe MVC</title>
			<link>http://www.sslearn.info/sslearn/knowing-silverstripe-mvc/</link>
			<description>&lt;p&gt;&lt;a href=&quot;http://www.sslearn.info/sslearn/what-is-silverstripe/&quot; title=&quot;What is Silverstripe?&quot;&gt;Silverstripe&lt;/a&gt; as CMS have a &lt;a href=&quot;http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller&quot; target=&quot;_blank&quot; title=&quot;MVC(Model View Controller)&quot;&gt;MVC (Model View Controller)&lt;/a&gt; development framework called Sapphire. By using these MVC silverstripe developers can easily modify silverstripe CMS. This MVC also has its own template engine that can separate between program code and layout of web pages perfectly. Silverstripe programmers can work on without having to think about the web interface (html code) and vice versa designers can work without the need to think about the logic of the program. Control loop and there is also conditional on the template engine is making it easier to integrate logic programming with web interface. If you previously have not used the MVC framework, then I think Sapphire is an easy to use MVC.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The MVC Directory Structure&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In fact, of the many directories on the Silverstripe CMS only two directories that are used for making a website. Two directories that will be used to create web is &lt;strong&gt;mysite&lt;/strong&gt; directory and &lt;strong&gt;themes&lt;/strong&gt;. Mysite directory used to store controller  and models files, while the themes directory to store themes (view) files that is used by silverstripe. Another directory contains the Sapphire MVC PHP code, javascript code, modules and other supporting code for silverstripe.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;right&quot; src=&quot;http://www.sslearn.info/sslearn/assets/Knowing-Silverstripe-MVC/Page-Type.png&quot; alt=&quot;Page Type&quot; title=&quot;Page Type&quot; width=&quot;209&quot; height=&quot;204&quot; /&gt;&lt;/p&gt;
&lt;p&gt;After knowing the directory structure we also need to know the model template engine on silverstripe. In silverstripe, every page will have a type (&lt;strong&gt;Page Type&lt;/strong&gt;). When creating a page in Silverstripe CMS we must determine what type of page will be created. The Basic page on silverstripe called Page. Page will have basic data structure to create a web page. It have a &lt;em&gt;Title (Page Name)&lt;/em&gt;, &lt;em&gt;MenuTitle (Navigation Label)&lt;/em&gt; and &lt;em&gt;Content&lt;/em&gt;. We can create a web page with this page types for the first time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model and Controller&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If we take the example of Page from BlackCandy template, the Page Type will have the models and controllers located in a file &lt;strong&gt;mysite/code/Page.php&lt;/strong&gt; and the view located in &lt;strong&gt;themes/blackcandy/templates/Page.ss&lt;/strong&gt;. If you open the file in the directory Page.php &lt;strong&gt;mysite/code/&lt;/strong&gt;, it will show two classes namely Page and Page_Controller. Class Page is a class that defines the model and a Page_Controller class defines the controller class of Page.&lt;/p&gt;
&lt;pre&gt;&amp;lt;?&lt;strong&gt;php&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;class&lt;/strong&gt; Page &lt;strong&gt;extends&lt;/strong&gt; SiteTree {&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; Page_Controller &lt;strong&gt;extends&lt;/strong&gt; ContentController {&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/pre&gt;
&lt;p&gt;We can define a new attribute that we want in the  Page Class. Or if we want to make new types of pages, we can use the Page Class as its parent class. For example we want to create a new type named Article which is derived from Page, then we must create a file named Article.php in the mysite/code/ directory.&lt;/p&gt;
&lt;pre&gt;&lt;strong&gt;class&lt;/strong&gt; Article &lt;strong&gt;extends&lt;/strong&gt; Page{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;class&lt;/strong&gt; Article_Controller &lt;strong&gt;extends&lt;/strong&gt; Page_Controller{&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;Each type of page will have a .ss file located in the directory themes/[the template names]/templates/. Now try look at BlackCandy themes, in the directory themes/blackcandy/templates/ will have a file called Page.ss, which is the view file of page type called Page. Then, if we create a type of page named Article above on BlackCandy, it should have a file named Article.ss located in themes/blackcandy/templates/. If the file does not exist, Silverstripe will call his parent ss file which is Page.ss.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The View&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The View from the silverstripe file has the extension .ss. Its located under the themes directory. As I mentioned before, each type of page will have a view that in accordance with the type name. Now we will take an example from the Page type. If we open Page.ss file from the directory themes/blackcandy/templates/, it will only show html codes with no PHP code.&lt;/p&gt;
&lt;pre&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot; &quot;http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd&quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; &amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% base_tag %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;&amp;lt;% if MetaTitle %&amp;gt;$MetaTitle&amp;lt;% else %&amp;gt;$Title&amp;lt;% end_if %&amp;gt; &amp;amp;raquo; Your Site Name&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $MetaTags(false)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel=&quot;shortcut icon&quot; href=&quot;/favicon.ico&quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% require themedCSS(layout) %&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% require themedCSS(typography) %&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% require themedCSS(form) %&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[if IE 6]&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;@import url(themes/blackcandy/css/ie6.css);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!--[if IE 7]&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;@import url(themes/blackcandy/css/ie7.css);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/style&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;![endif]--&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div id=&quot;BgContainer&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id=&quot;Container&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id=&quot;Header&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $SearchForm&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;h1&amp;gt;Your Site Name&amp;lt;/h1&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;your site&amp;amp;#39;s tagline here&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id=&quot;Navigation&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% include Navigation %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;!-- --&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id=&quot;Layout&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; $Layout&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;div class=&quot;clear&quot;&amp;gt;&amp;lt;!-- --&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id=&quot;Footer&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;% include Footer %&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt; &lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;
&lt;p&gt;This html code which will be displayed to the user via the browser.&lt;/p&gt;
&lt;p&gt;So How do silverstripe connect the model and the controller with his view?&lt;/p&gt;
&lt;p&gt;if you see more detail into the Page.ss files syntax and there are some unusual html tag such as &lt;strong&gt;&amp;lt;% base_tag %&amp;gt;, &amp;lt;% include ... %&amp;gt;, &amp;lt;% control ... %&amp;gt;&lt;/strong&gt; or text like &lt;strong&gt;$Layout&lt;/strong&gt;. It is the characters used by silverstripe  template engine to connect between the logic code and web interface. For more details about the  silverstripe template engine, will be discussed later.&lt;/p&gt;
&lt;p&gt;OK, that's some of the basic Silversrtipe MVC. If you learn this MVC, then you will master the Silverstripe CMS and you can make any website with CMS Silversrtipe&lt;/p&gt;</description>
			<pubDate>Tue, 16 Mar 2010 05:58:59 -0500</pubDate>
			
			<guid>http://www.sslearn.info/sslearn/knowing-silverstripe-mvc/</guid>
		</item>
		
		<item>
			<title>Installing Mod_Rewrite on Apache</title>
			<link>http://www.sslearn.info/sslearn/installing-mod-rewrite-on-apache/</link>
			<description>&lt;p&gt;Mod_rewrite is used to change the URL using the commands rewriting engine (based on regex parser) is requested on the fly (directly). To use this module the Apache minimum version required is Apache 1.2 or latest version. You can install as a module mod_rewrite on your Apache webserver.&lt;/p&gt;
&lt;p&gt;Before you install this module first checks whether the module is already installed by using phpinfo() if you are using php as a web programming. Loaded Modules section will appear modules that already installed, look for the words mod_rewrite, if exists you do not need to install the module, if not then prepared to install it.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;center&quot; src=&quot;http://www.sslearn.info/sslearn/assets/Installing-Mod_Rewrite-on-Apache/_resampled/ResizedImage400210-apachehandlers.png&quot; alt=&quot;Apache Handlers&quot; title=&quot;Apache Handlers&quot; width=&quot;400&quot; height=&quot;210&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The author uses Apache/2.2.12, PHP/5.2.10, Apache server bundle with Ubuntu Linux as operating system. To install this module looking for Apache httpd.conf file found in &quot;/etc/apache2&quot;. Open the file with your preferred editor, notepad, gEdit, vim, nano, etc.. Find rows that contain word mod_rewrite.&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;# LoadModule rewrite_module modules/mod_rewrite.so&lt;/pre&gt;
&lt;p&gt;Then remove the sign # in line to become:&lt;/p&gt;
&lt;pre&gt;LoadModule rewrite_module modules/mod_rewrite.so&lt;/pre&gt;
&lt;p&gt;Save the httpd.conf file and then restart your Apache, the mod_rewrite module is ready for use. To ensure re-check with the phpinfo().&lt;/p&gt;
&lt;p&gt;To make the file is easy, open your editor and save as the name &quot;.htaccess&quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are hosting to a provider usually we are not allowed to use the file type &quot;.htaccess&quot;, then ask your provider to allow it. If you are using in the test localserver the configuration file is in httpd.conf, find the location of the directory where you placed the files of your web.&lt;/p&gt;
&lt;pre&gt;        &amp;lt;Directory /var/www/&amp;gt;
                Options Indexes FollowSymLinks MultiViews
                AllowOverride all # &lt;strong&gt;You must change&lt;/strong&gt;
                Order allow,deny
                allow from all
        &amp;lt;/Directory&amp;gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;p&gt;This section is to restrict the use of &quot;.htaccess&quot; on the server, for security settings are at &quot;None&quot; in this case to menggunakani mod_rewrite then turned into &quot;all&quot;.&lt;/p&gt;
&lt;p&gt;After all the preparation has been done so mod_rewrite is ready to use. Now open your .htaccess file and write the following code then save.&lt;/p&gt;
&lt;pre&gt;Options +FollowSymLinks 
RewriteEngine On 
RewriteRule google http://www.google.com/? [R,L]&lt;/pre&gt;
&lt;p&gt;Call your browser and type localhost/google or www.yourdomain.com/google, if the URL directly redirect to google.com means your mod_rewrite is running.&lt;/p&gt;</description>
			<pubDate>Sun, 21 Mar 2010 20:35:16 -0500</pubDate>
			
			<guid>http://www.sslearn.info/sslearn/installing-mod-rewrite-on-apache/</guid>
		</item>
		

	</channel>
</rss>
