Greg Slepak avatar Greg Slepak committed 421f1da

updated web-root and undid a mistake from the previous commit

Comments (0)

Files changed (4)

api-docs/dragonfly.lsp.html

 
 <br/><br/><center>- &sect; -</center><br/>
 <a name="Dragonfly_web-root"></a><h3><font color=#CC0000>Dragonfly:web-root</font></h3>
-<b>syntax: (<font color=#CC0000>Dragonfly:web-root</font> <em>str-path</em> <em>bool-question-mark</em>)</b><br/>
+<b>syntax: (<font color=#CC0000>Dragonfly:web-root</font> [<em>str-path</em> [<em>bool-question-mark</em>]])</b><br/>
 <b>parameter: </b><em>str-path</em> - Path relative to the folder containing <tt>index.cgi</tt>.<br/>
 <b>parameter: </b><em>bool-question-mark</em> - Whether to return a URL with /? prepended.<br/>
  <p>This function is quite handy for making working links when your <tt>index.cgi</tt> file
 <b>example:</b><blockquote><pre> ; index.cgi is located in /home/user/site.com/examples-site
  ; Users visit http://www.site.com/example-site
  (web-root "about") =&gt; "/example-site/about"
- (web-root "/foo" true) =&gt; "/example-site/?foo"</pre></blockquote>
+ (web-root "/foo" true) =&gt; "/example-site/?foo"
+ (web-root) =&gt; /example-site/</pre></blockquote>
 <br/><br/><center>- &sect; -</center><br/>
 <a name="Dragonfly_view-path"></a><h3><font color=#CC0000>Dragonfly:view-path</font></h3>
 <b>syntax: (<font color=#CC0000>Dragonfly:view-path</font> <em>str-view-name</em>)</b><br/>

example-site/dragonfly-framework/dragonfly.lsp

 	)
 )
 
-;; @syntax (Dragonfly:web-root <str-path> <bool-question-mark>)
+;; @syntax (Dragonfly:web-root [<str-path> [<bool-question-mark>]])
 ;; @param <str-path> Path relative to the folder containing 'index.cgi'.
 ;; @param <bool-question-mark> Whether to return a URL with /? prepended.
 ;; <p>This function is quite handy for making working links when your 'index.cgi' file
 ;; ; Users visit http://www.site.com/example-site
 ;; (web-root "about") => "/example-site/about"
 ;; (web-root "/foo" true) => "/example-site/?foo"
-(define (web-root path question-mark)
+;; (web-root) => /example-site/
+(define (web-root (path "") question-mark)
 	; WEB_ROOT should have a "/" on the end
 	(if (starts-with path "/") (pop path))
 	(string WEB_ROOT (if question-mark "?" "") path)

example-site/views/404.html

 <body>
   <div class="dialog">
     <h1>We're sorry, but something went wrong. (404)</h1>
-    <p>We couldn't find the page or file you asked for. Start over right <a href="/">here</a>.</p>
+    <p>We couldn't find the page or file you asked for. Start over right <a href="./">here</a>.</p>
   </div>
 </body>
 </html>

example-site/views/500.html

 <body>
   <div class="dialog">
     <h1>We're sorry, but something went wrong.</h1>
-    <p>We've been notified about this issue and we'll take a look at it shortly. Start over right <a href="/">here</a>.</p>
+    <p>We've been notified about this issue and we'll take a look at it shortly. Start over right <a href="./">here</a>.</p>
 	<div class="backtrace">
 		<%=(join (parse (last (last-error)) "\n") "<br/>")%>
 	</div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.