Commits

Greg Slepak committed 37ab823

fixed the foo page

Comments (0)

Files changed (3)

example-site/dragonfly-framework/plugins-active/dragonfly_basic.lsp

 ;; @param <int-timeout> an integer containing the number of microseconds after recalling the request-url
 ;; <p>Writes a simple AJAX-updater, e.g. for displaying the time on a website.</p>
 (define (ajax-updater html-elementid request-url str-params timeout)
-	; check for newLISP as webSERVER_SOFTWARE, then we've to use a ? before request-url, because there's no working .htaccess
+	; check for newLISP as SERVER_SOFTWARE, then we prefix a ? before request-url because there's no working .htaccess
 	(when (find "newLISP" SERVER_SOFTWARE)
 		(if (starts-with request-url "/") (pop request-url))
 		(push "/?" request-url)

example-site/foo/index.html

+<% (setf viewname "Foo Static Page") %>
 <% (display-partial "doctype") %>
 <% (display-partial "header") %>
 

example-site/views/dragonfly_views.html

 		<h1>Using Templates</h1>
 		<p class="extract">A view is simply a web page, or a page fragment, like a header or footer. In fact, views can flexibly be embedded within other views. In that case we call them partials.</p>
 
-		<h3 class="code">How to load a view</h3>
+		<h2>How to load a view</h2>
 		<p>Example: open Your favorite text-editor and enter the following:</p>
 		<pre class="code">Hello World</pre>
 		<p>Save the file as "hello" into Your views directory. Now open Your browser and navigate to <a href="http://www.example-site.com/hello">example-site.com/hello</a>. That's it!</p>
 		<p class="info"><b>Information</b><br/>You can put nearly everything into views: (X)HTML, Javascript, newLISP code.</p>
 		<p class="config"><b>Configuration</b><br/>If VIEW_EXTENSION is ".html" for example, then when example-site.com/hello is called Dragonfly will search for a "hello.html" file in the VIEWS_PATH. It also applies to the partials, too.</p>
 
-		<h3 class="code">How to call functions inside a view</h3>
+		<h2>How to call functions inside a view</h2>
 		<pre class="code">&lt;% (benchmark-result) %&gt;</pre>
 		
 		<p>Put Your function call inside our open and close brackets and there You go! That will display some stats about rendering time and memory consumption.</p>
 		
 		<p class="info"><b>Information</b><br/>You can use all functions from newLISP and Dragonfly. Additionally You may write Your own functions inside a plugin and just put the file into the "plugins-active" directory.</p>
 				
-		<h3 class="code">How to load a partial view</h3>
+		<h2>How to load a partial view</h2>
+		<p>Partials are just like views, there's really no difference. Sometimes it's nice
+			to place your headers and footers in a different folder from your other views, and for
+			those who want this Dragonfly provides explicit support through the 'display-partial' function:</p>
 		<pre class="code">&lt;% (display-partial "header") %&gt;</pre>
 		
 		<p>This simple argument would load the "header"-partial from the partials directory.</p>