Commits

Greg Slepak  committed a0d52a7

- partial renamed to display-partial
- added display-view
- added display-error
- changed TEMPLATE_EXTENSION to STATIC_EXTENSIONS
- now TEMPLATE_EXTENSION is used to signify optional file extensions for views and partials
- removed DEFAULT404 and added dynamic error support through ERROR_TEMPLATE and display-error

  • Participants
  • Parent commits 6e14dbd

Comments (0)

Files changed (19)

File example-site/dragonfly-framework/config.lsp

 
 ; if you set to nil then make sure to comment out the line in .htaccess
 (constant 'ENABLE_STATIC_TEMPLATES true)
-; extension that triggers the handler (must match the one in .htaccess)
-(constant 'TEMPLATE_EXTENSION ".html")
+; file extensions that triggers the handler (update .htaccess to match this!)
+(constant 'STATIC_EXTENSIONS '(".html"))
 
 ;===============================================================================
 ; Views
 (constant 'DEFAULTACTION "index") ; display all
 ; setting a default rss view
 (constant 'DEFAULTRSS "dragonfly_rssfeed")
-; setting a 404 view
-(constant 'DEFAULT404 "404")
+; if non-nil, then all of your views (and partials) must have this extension
+; ex: ".html"
+(constant 'TEMPLATE_EXTENSION nil)
 
 ;===============================================================================
 ; RESTful Resources

File example-site/dragonfly-framework/docs/dragonfly.lsp.src.html

   	<font color='#AA0000'>(</font>Web:eval-template <font color='#AA0000'>(</font><font color='#0000AA'>read-file</font> path-to-templates<font color='#AA0000'>)</font><font color='#AA0000'>)</font>
 <font color='#AA0000'>)</font>
 
-<font color='#555555'>;; <font color='#308080'>@syntax</font> (Dragonfly:partial &lt;template&gt;)</font>
+<font color='#555555'>;; <font color='#308080'>@syntax</font> (display-partial &lt;template&gt;)</font>
 <font color='#555555'>;; <font color='#308080'>@param</font> &lt;template&gt; name of partial template</font>
 <font color='#555555'>;; &lt;p&gt;Evaluates the partial template and returns it.&lt;/p&gt;</font>
 <font color='#555555'>;; </font>

File example-site/dragonfly-framework/dragonfly.lsp

 	((matches?)
 		; ex: .html or .html?a=4
 		(set 'file (if (empty? (set 'chunks (parse QUERY_STRING "?"))) QUERY_STRING (first chunks)))
-		(if (ends-with QUERY_STRING Dragonfly:TEMPLATE_EXTENSION)
-			(set 'content-type Response:html-type)
-			(or (ends-with QUERY_STRING ".xml") (ends-with QUERY_STRING ".rss"))
-			(set 'content-type Response:xml-type)
-		)
+		(set 'ext (exists (curry ends-with file) DF:STATIC_EXTENSIONS))
 	)
 	((run)
 		; pass through template TODO: make sure this is secure! no ../ bullshit!
 		(DF:log-debug "Route.Static: " file)
-		(Response:content-type content-type)
+		(Response:content-type (Response:extension->type ext))
 		(Web:eval-template (read-file file))
 	)
 )
 (define-subclass (Route.View Route)
 	((matches?)
 		(if (empty? QUERY_STRING)
-			(set 'viewpath (string Dragonfly:VIEWS_PATH "/" Dragonfly:DEFAULTVIEW))
-			(set 'viewpath (string Dragonfly:VIEWS_PATH "/" (first (parse QUERY_STRING "/"))))
+			(set 'DF:viewname DF:DEFAULTVIEW)
+			(set 'DF:viewname (first (parse QUERY_STRING "/")))
 		)
-		(file? viewpath)
+		(file? (DF:view-path DF:viewname))
 	)
 	((run)
 		; pass through template
-		(DF:log-debug "Route.View: " viewpath)
-		(set 'Dragonfly:viewname (last (parse viewpath "/")))
-		(Web:eval-template (read-file viewpath))
+		(DF:log-debug "Route.View: " DF:viewname)
+		(DF:display-view DF:viewname)
 	)
 )
 
 (define-subclass (Route.ALL Route)
 	((matches?) true)
 	((run)
-		; 404 or redirect to home page?
-		; TODO: if DEFAULT404 not found then still send something
-		(DF:log-debug "Route.ALL")
-		(Web:eval-template (read-file (string Dragonfly:VIEWS_PATH "/" Dragonfly:DEFAULT404)))
+		(DF:log-debug "Route.ALL for QUERY_STRING: " QUERY_STRING)
+		(DF:display-error 404)
 	)
 )
 
 (context 'Dragonfly)
 
-(push (Route.ALL) dragonfly-routes)
-(if ENABLE_VIEW_HANDLER (push (Route.View) dragonfly-routes))
-(if ENABLE_RESTFUL_HANDLER (push (Route.Resource) dragonfly-routes))
-(if ENABLE_STATIC_TEMPLATES (push (Route.Static) dragonfly-routes))
+(if ENABLE_STATIC_TEMPLATES (push (Route.Static) dragonfly-routes -1))
+(if ENABLE_RESTFUL_HANDLER (push (Route.Resource) dragonfly-routes -1))
+(if ENABLE_VIEW_HANDLER (push (Route.View) dragonfly-routes -1))
+(push (Route.ALL) dragonfly-routes -1)
 
 ; TODO: these either need to be deleted or moved elsewhere
 ; set the paths to views and partials
 
 (error-event error-handler)
 
-;; @syntax (Dragonfly:partial <partial>)
+(define (view-path viewname)
+	(string VIEWS_PATH "/" viewname (if TEMPLATE_EXTENSION TEMPLATE_EXTENSION ""))
+)
+
+(define (partial-path partialname)
+	(string PARTIALS_PATH "/" partialname (if TEMPLATE_EXTENSION TEMPLATE_EXTENSION ""))
+)
+
+;; @syntax (Dragonfly:display-partial <partial>)
 ;; @param <partial> name of partial
-;; <p>Evaluates the partial and returns it.</p>
+;; <p>Evaluates the partial and returns it (or nil).</p>
+;;
+(define (display-partial partialname)
+  	(Web:eval-template (read-file (partial-path partialname)))
+)
 
-(define (partial partialname)
-  	(Web:eval-template (read-file (string PARTIALS_PATH "/" partialname)))
+(define (display-view viewname)
+	(Web:eval-template (read-file (view-path viewname)))
+)
+
+(define (display-error error-code)
+	(Response:status error-code)
+	(unless (display-view (string error-code))
+		(log-info "display-error using ERROR_TEMPLATE for error-code " error-code)
+		(Web:eval-template ERROR_TEMPLATE)
+	)
 )
 
 (define (listener)
 		)
 	)
 )
-	
+
+;===============================================================================
+; !Private Variables
+;===============================================================================
+
+(set 'ERROR_TEMPLATE
+[text]
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title><%= (join (map string (Response:status)) " ") %></title>
+</head><body>
+<h1><%= (last (Response:status)) %></h1>
+<p>The requested URL /<%= QUERY_STRING %> resulted in error <%= (join (map string (Response:status)) " ") %>.</p>
+<p>Additionally, a 404 Not Found
+error was encountered while trying to use an ErrorDocument to handle the request.</p>
+</body></html>
+[/text]
+)
+
 (context MAIN)

File example-site/dragonfly-framework/lib/response.lsp

 				(push (list code description) status-codes))
 			(setf status-code code)
 		)
-		(list status-code (lookup status-code status-codes))
+		(assoc status-code status-codes)
 	)
 )
 
 	)
 )
 
+(define (extension->type file-extension)
+	(if-not (starts-with file-extension ".") (push "." file-extension))
+	(lookup file-extension extension-to-type-map)
+)
+
 (constant 'text-type "text/plain; charset=utf-8")
 (constant 'html-type "text/html; charset=utf-8")
 (constant 'xml-type "text/xml; charset=utf-8")
 (constant 'atom-type "application/atom+xml; charset=utf-8")
 
+(set 'extension-to-type-map
+  '((".html" html-type)
+	(".xml" xml-type)
+	(".rss" xml-type)
+	(".txt" text-type))
+)
+
 ;===============================================================================
 ; !Private Functions
 ;===============================================================================

File example-site/dragonfly-framework/lib/web.lsp

 		)
 		(setf str (slice str (+ end 2)))
 	)
-	(write-buffer buf (string "(print [text]" str "[/text])"))
-	(eval-string buf ctx)
+	(when str
+		(write-buffer buf (string "(print [text]" str "[/text])"))
+		(eval-string buf ctx)
+	)
 )
 
 (context 'MAIN)

File example-site/views/404

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| marchildmann.com") %><p>
+			<p><% (title "| marchildmann.com") %><p>
 		</div>
 		
 		<img src="/includes/images/houses.jpg" class="border" alt="Houses" width="474" height="267"/>
 		<div class="line-dotted"></div>
 
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>
 

File example-site/views/blog

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| marchildmann.com") %><p>
+			<p><% (title "| marchildmann.com") %><p>
 		</div>
 
-		<% (Dragonfly:load-database "blog.nldb") %>
+		<% (load-database "blog.nldb") %>
 		<% (set 'data (nldb:select-rows 'entries true true 'ID > )) %>
 		<%	
 
 		
 		<div class="line-dotted"></div>
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>

File example-site/views/dragonfly_ajax

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| Dragonfly web framework") %><p>
+			<p><% (title "| Dragonfly web framework") %><p>
 		</div>
 		
 		<h1>AJAX calls</h1>
 		<p class="extract">Dragonfly provides some simple AJAX functions. With AJAX, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The use of AJAX techniques has led to an increase in interactive or dynamic interfaces on web pages and better quality of Web services due to the asynchronous mode. Data is usually retrieved using the XMLHttpRequest object. (source: wikipedia.org)
 		</p>
 		<h2>Current time</h2>
-		<p><% (Dragonfly:ajax-updater "timer" "/dragonfly_ajax-date/index" "gettime" "1000") %></p>
+		<p><% (ajax-updater "timer" "/dragonfly_ajax-date/index" "gettime" "1000") %></p>
 
 		<h2>Real-time tweets for 'michael jackson'</h2>
-		<p><% (Dragonfly:ajax-updater "twitter" "/dragonfly_ajax-twitter/index" "gettweets" "1000") %></p>
+		<p><% (ajax-updater "twitter" "/dragonfly_ajax-twitter/index" "gettweets" "1000") %></p>
 		
 		<div class="line-dotted"></div>
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>
 

File example-site/views/dragonfly_ajax-date

-<% (Dragonfly:time-now) %>
+<% (time-now) %>

File example-site/views/dragonfly_ajax-twitter

-<% (Dragonfly:twitter-search "michael jackson" "1") %>
+<% (twitter-search "michael jackson" "1") %>

File example-site/views/dragonfly_debug

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "Dragonfly web framework") %><p>
+			<p><% (title "Dragonfly web framework") %><p>
 		</div>
 		
-		<% (Dragonfly:debugging) %>
+		<% (debugging) %>
 
 		<div class="line-dotted"></div>
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>
 
 
 

File example-site/views/dragonfly_seo

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| Dragonfly web framework") %><p>
+			<p><% (title "| Dragonfly web framework") %><p>
 		</div>
 		
 		<h1>Dragonfly SEO functions</h1>
 		</p>
 				
 		<h2>Check description length Results</h2>
-		<% (Dragonfly:check-meta-description) %><br/><br/>
+		<% (check-meta-description) %><br/><br/>
 
 		<h2>Check number of meta-keywords</h2>
-		<% (Dragonfly:check-meta-keywords (list "dragonfly" "framework" "lisp" "marc hildmann")) %><br/><br/>
+		<% (check-meta-keywords (list "dragonfly" "framework" "lisp" "marc hildmann")) %><br/><br/>
 
 
 		<h2>SEO Results</h2>
-		<% (Dragonfly:table_open (list "Website" "Google Pagerank&trade;" "Estimated Result Count" "No. keywords" "Description")) %>
-		<% (Dragonfly:table_footer "Dragonfly SEO Experiments") %>
-		<% (Dragonfly:table_data (list "www.newlisp.org" "4" (Dragonfly:google-results-domain "www.newlisp.org") (Dragonfly:check-meta-keywords (list "dragonfly" "framework" "lisp" "marc hildmann")) "") ) %>
-		<% (Dragonfly:table_close) %>
+		<% (table_open (list "Website" "Google Pagerank&trade;" "Estimated Result Count" "No. keywords" "Description")) %>
+		<% (table_footer "Dragonfly SEO Experiments") %>
+		<% (table_data (list "www.newlisp.org" "4" (Dragonfly:google-results-domain "www.newlisp.org") (Dragonfly:check-meta-keywords (list "dragonfly" "framework" "lisp" "marc hildmann")) "") ) %>
+		<% (table_close) %>
 
 
 		
 		<div class="line-dotted"></div>
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>
 

File example-site/views/dragonfly_tables

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| Dragonfly web framework") %><p>
+			<p><% (title "| Dragonfly web framework") %><p>
 		</div>
 		
 		<h1>Using newLISP Database</h1>
-		<% (Dragonfly:use-database "blog.nldb") %>
+		<% (use-database "blog.nldb") %>
 		<% 
 			(if (= Dragonfly:action "save")
 				(Dragonfly:new-row "blog.nldb" 'entries ($POST)) 
 			)
 		%>
-		<% (Dragonfly:create-table "blog.nldb" 'entries (list "ID" "Headline" "Text" "Author")) %>
-		<% (Dragonfly:table_open (nldb:list-columns entries)) %>
+		<% (create-table "blog.nldb" 'entries (list "ID" "Headline" "Text" "Author")) %>
+		<% (table_open (nldb:list-columns entries)) %>
 		<% (set 'query (nldb:select-rows 'entries true true)) %>
 		<% (map Dragonfly:table_data query) %>
-		<% (Dragonfly:table_close) %>
+		<% (table_close) %>
 		<br/><br/>
 
-		<% (Dragonfly:form-generate-from-columns "blog.nldb" entries) %>
+		<% (form-generate-from-columns "blog.nldb" entries) %>
 		
 		<div class="line-dotted"></div>
 
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-solid"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>
 

File example-site/views/dragonfly_twitter

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| Dragonfly web framework") %><p>
+			<p><% (title "| Dragonfly web framework") %><p>
 		</div>
 		
 		<h1>Twitter search</h1>
 		<p class="extract">Twitter is a free social networking and micro-blogging service that enables its users to send and read messages known as tweets. Tweets are text-based posts of up to 140 characters displayed on the author's profile page and delivered to the author's subscribers who are known as followers. Senders can restrict delivery to those in their circle of friends or, by default, allow open access. (source: wikipedia.org)
 		</p>
 
-		<% (Dragonfly:twitter-search "newlisp" "10") %>
+		<% (twitter-search "newlisp" "10") %>
 		
 		<div class="line-dotted"></div>
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>

File example-site/views/dragonfly_welcome

-<% (Dragonfly:partial "doctype") %>
-<% (Dragonfly:partial "header") %>
+<% (display-partial "doctype") %>
+<% (display-partial "header") %>
 
 <body>
 
 <div id="wrap">
 	<div id="header">
-		<% (Dragonfly:partial "navigation") %>	
+		<% (display-partial "navigation") %>	
 		<div class="clear"></div>
 	</div>
 
 	<div id="content">
 				
 		<div class="title nomargin">
-			<p><% (Dragonfly:title "| Dragonfly web framework") %><p>
+			<p><% (title "| Dragonfly web framework") %><p>
 		</div>
 		
 		<img src="/includes/images/houses.jpg" class="border" alt="Houses" width="474" height="267"/>
 
 		<h2>Getting Started</h2>
 		<ol>
-			<li>We assume that You've already installed newLISP. If not, then download it first at <% (Dragonfly:link_to_external "official site of newLISP" "http://www.newlisp.org/") %></li>
-			<li>Then download the latest version of <% (Dragonfly:link_to_external "Dragonfly at GoogleCode" "http://code.google.com/p/dragonfly-newlisp/downloads/list") %></li>
+			<li>We assume that You've already installed newLISP. If not, then download it first at <% (link_to_external "official site of newLISP" "http://www.newlisp.org/") %></li>
+			<li>Then download the latest version of <% (link_to_external "Dragonfly at GoogleCode" "http://code.google.com/p/dragonfly-newlisp/downloads/list") %></li>
 			<li>Extract the archive to Your harddrive</li>
 			<li>Start the builtin webserver by typing "newlisp -http -c -d 8080 -w /path/to/your/archive"</li>
-			<li>Open Your browser and navigate to <% (Dragonfly:link_to_external "http://localhost:8080/" "http://localhost:8080/") %></li>
+			<li>Open Your browser and navigate to <% (link_to_external "http://localhost:8080/" "http://localhost:8080/") %></li>
 		</ol>
 		<p>&nbsp;</p>
 
 		
 		<div class="line-dotted"></div>
 
-		<% (Dragonfly:benchmark-result) %>
+		<% (benchmark-result) %>
 		
 		<div class="line-dotted"></div>
 		
 	</div><!-- END CONTENT -->
 	
 </div><!-- END WRAP -->
-<% (Dragonfly:partial "footer") %>
+<% (display-partial "footer") %>
 

File example-site/views/partials/doctype

-<% (Dragonfly:benchmark-start) %>
+<% (benchmark-start) %>
 <!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" xml:lang="en">

File example-site/views/partials/footer

 
 
 <!-- BEGIN Google Analytics -->
-	<% (Dragonfly:google-analytics "UA-270258-9") %>
+	<% (google-analytics "UA-270258-9") %>
 <!-- END Google Analytics -->
 </body>
 </html>

File example-site/views/partials/header

 <head>
-	<title><% (Dragonfly:title "Dragonfly web framework - User Guide") %></title>
-	<% (Dragonfly:meta "author" "Marc Hildmann") %>
-	<% (Dragonfly:meta "keywords" "newlisp, framework, dragonfly, web framework") %>
-	<% (Dragonfly:css "screen" "/includes/css/screen.css") %>
-	<% (Dragonfly:script "/includes/js/dragonfly.js") %>
-	<% (Dragonfly:rss "Dragonfly web framework RSS Feed" "/dragonfly_rssfeed/xml") %>
+	<title><% (title "Dragonfly web framework - User Guide") %></title>
+	<% (meta "author" "Marc Hildmann") %>
+	<% (meta "keywords" "newlisp, framework, dragonfly, web framework") %>
+	<% (css "screen" "/includes/css/screen.css") %>
+	<% (script "/includes/js/dragonfly.js") %>
+	<% (rss "Dragonfly web framework RSS Feed" "/dragonfly_rssfeed/xml") %>
 </head>

File example-site/views/partials/navigation

 	          <div id="menu" class="clearfix" style="display: none;">
 	            <dl class="L">
 	              <dt>Start Here</dt>
-				  <dd><% (Dragonfly:link_to  "Welcome" "dragonfly_welcome" "index") %></dd>
+				  <dd><% (link_to  "Welcome" "dragonfly_welcome" "index") %></dd>
 
 	              <dt>Tables</dt>
-	              <dd><% (Dragonfly:link_to "Generate tables from lists" "dragonfly_tables" "index") %></dd>
+	              <dd><% (link_to "Generate tables from lists" "dragonfly_tables" "index") %></dd>
 
 	              <dt>AJAX</dt>
-	              <dd><% (Dragonfly:link_to "Some simple AJAX calls" "dragonfly_ajax" "index") %></dd>
+	              <dd><% (link_to "Some simple AJAX calls" "dragonfly_ajax" "index") %></dd>
 	
 	              <dt>Twitter</dt>
-	              <dd><% (Dragonfly:link_to "Using Twitter with Dragonfly" "dragonfly_twitter" "index") %></dd>
+	              <dd><% (link_to "Using Twitter with Dragonfly" "dragonfly_twitter" "index") %></dd>
 
 	              <dt>SEO Experiments</dt>
-	              <dd><% (Dragonfly:link_to "Experiments in SEO" "dragonfly_seo" "index") %></dd>
+	              <dd><% (link_to "Experiments in SEO" "dragonfly_seo" "index") %></dd>
 				</dl>
 	
 				<dl class="R">
 	              <dt>Useful information</dt>
-	              <dd><% (Dragonfly:link_to  "Dragonfly debugging information" "dragonfly_debug" "index") %></dd>
+	              <dd><% (link_to  "Dragonfly debugging information" "dragonfly_debug" "index") %></dd>
 				</dl>
 				</div>
 	</li>
-	<li><% (Dragonfly:link_to "Home" "welcome" "index") %></li>
-	<li><% (Dragonfly:link_to "Blog" "blog" "index") %></li>
-	<li><% (Dragonfly:link_to "Photographie" "photographie" "index") %></li>
+	<li><% (link_to "Home" "welcome" "index") %></li>
+	<li><% (link_to "Blog" "blog" "index") %></li>
+	<li><% (link_to "Photographie" "photographie" "index") %></li>
 
 </ul>
 <!-- END NAVIGATION -->