More view docs
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 1fb73e2 · Browse files · 10 files·+65 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
10 files+65 added−8 removed
- other:+65 added−8 removed
Provenance
- Commit
1c8ff48- Tree
9461b87- Author
Tj Holowaychuk <tj@vision-media.ca>- Committer
Tj Holowaychuk <tj@vision-media.ca>- Parent
1fb73e2
10 files changed+65 added−8 removed
modified:docs/layout/head.html+1 added-1 removed
122 unmodified linesExpand all12312412512612712712812913013148 unmodified lines122 unmodified linesExpand all background: rgba(0,0,0,0.2); border-right: 1px solid rgba(255,255,255,0.05); } #toc li { padding: 1px 0; padding: 0; list-style: none; } #toc li a { font-size: 11px;48 unmodified linesmodified:docs/api.html+1 added-1 removed
926 unmodified lines927 928 <p> Most engines accept one or more of the following options,929 both <em>haml</em> and <em>jade</em> accept all:</p>930 931-<ul><li><code>context</code> Template evaluation context (<code>this</code>)</li><li><code>locals</code> Object containing local variables</li><li><code>filename</code> Filename used for the <code>cache</code> option</li><li><code>cache</code> Cache intermediate JavaScript in memory</li><li><code>debug</code> Output debugging information</li></ul>931+<ul><li><code>context|scope</code> Template evaluation context (<code>this</code>)</li><li><code>locals</code> Object containing local variables</li><li><code>filename</code> Filename used for the <code>cache</code> option</li><li><code>cache</code> Cache intermediate JavaScript in memory</li><li><code>debug</code> Output debugging information</li></ul>932 933 <h2></h2>934 935 <ul><li><p><strong>param</strong>: <em>String</em> view</p></li><li><p><strong>param</strong>: <em>Object</em> options</p></li><li><p><strong>param</strong>: <em>Function</em> fn</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>97 unmodified linesmodified:docs/contrib.html+1 added-1 removed
122 unmodified lines123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127- padding: 1px 0;127+ padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;94 unmodified linesmodified:docs/executable.html+1 added-1 removed
122 unmodified lines123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127- padding: 1px 0;127+ padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;71 unmodified linesmodified:docs/guide.1+23 added
680 unmodified lines681 .682 .P683 Express supports \"redirect mapping\", which by default provides \fIhome\fR, and \fIback\fR\. The \fIback\fR map checks the \fIReferrer\fR and \fIReferer\fR headers, while \fIhome\fR utilizes the \"home\" setting and defaults to \"/\"\.684 .685+.SS "res\.render(view[, options[, fn]])"686+Render \fIview\fR with the given \fIoptions\fR and optional callback \fIfn\fR\. When a callback function is given a response will \fInot\fR be made automatically, however otherwise a response of \fI200\fR and \fItext/html\fR is given\.687+.688+.P689+Most engines accept one or more of the following options, both haml \fIhttp://github\.com/visionmedia/haml\.js\fR and jade \fIhttp://github\.com/visionmedia/jade\fR accept all:690+.691+.IP "\(bu" 4692+\fIcontext|scope\fR Template evaluation context (\fIthis\fR)693+.694+.IP "\(bu" 4695+\fIlocals\fR Object containing local variables696+.697+.IP "\(bu" 4698+\fIfilename\fR Filename used for the \fIcache\fR option699+.700+.IP "\(bu" 4701+\fIcache\fR Cache intermediate JavaScript in memory702+.703+.IP "\(bu" 4704+\fIdebug\fR Output debugging information705+.706+.IP "" 0707+.708 .SS "app\.set(name[, val])"709 Apply an application level setting \fIname\fR to \fIval\fR, or get the value of \fIname\fR when \fIval\fR is not present:710 .711 .IP "" 4172 unmodified linesmodified:docs/guide.html+20 added-1 removed
122 unmodified lines123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127- padding: 1px 0;127+ padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;56 unmodified lines188 <li><a href="#res-sendfile-path-">res.sendfile()</a></li>189 <li><a href="#res-download-file-filename-">res.download()</a></li>190 <li><a href="#res-send-body-status-headers-status-status-">res.send()</a></li>191 <li><a href="#res-redirect-url-status-">res.redirect()</a></li>192+<li><a href="#res-render-view-options-fn-">res.render()</a></li>193 <li><a href="#app-set-name-val-">app.set()</a></li>194 <li><a href="#app-enable-name-">app.enable()</a></li>195 <li><a href="#app-disable-name-">app.disable()</a></li>196 <li><a href="#app-configure-env-function-function-">app.configure()</a></li>477 unmodified lines674 <p>Express supports "redirect mapping", which by default provides <em>home</em>, and <em>back</em>.675 The <em>back</em> map checks the <em>Referrer</em> and <em>Referer</em> headers, while <em>home</em> utilizes676 the "home" setting and defaults to "/".</p>677 678+<h3 id="res-render-view-options-fn-">res.render(view[, options[, fn]])</h3>679+680+<p>Render <em>view</em> with the given <em>options</em> and optional callback <em>fn</em>.681+When a callback function is given a response will <em>not</em> be made682+automatically, however otherwise a response of <em>200</em> and <em>text/html</em> is given.</p>683+684+<p> Most engines accept one or more of the following options,685+ both <a href="http://github.com/visionmedia/haml.js">haml</a> and <a href="http://github.com/visionmedia/jade">jade</a> accept all:</p>686+687+<ul>688+<li><em>context|scope</em> Template evaluation context (<em>this</em>)</li>689+<li><em>locals</em> Object containing local variables</li>690+<li><em>filename</em> Filename used for the <em>cache</em> option</li>691+<li><em>cache</em> Cache intermediate JavaScript in memory</li>692+<li><em>debug</em> Output debugging information</li>693+</ul>694+695+696 <h3 id="app-set-name-val-">app.set(name[, val])</h3>697 698 <p>Apply an application level setting <em>name</em> to <em>val</em>, or699 get the value of <em>name</em> when <em>val</em> is not present:</p>107 unmodified linesmodified:docs/guide.md+15 added
418 unmodified lines419 Express supports "redirect mapping", which by default provides _home_, and _back_.420 The _back_ map checks the _Referrer_ and _Referer_ headers, while _home_ utilizes421 the "home" setting and defaults to "/".422 423+### res.render(view[, options[, fn]])424+425+Render _view_ with the given _options_ and optional callback _fn_.426+When a callback function is given a response will _not_ be made427+automatically, however otherwise a response of _200_ and _text/html_ is given.428+429+ Most engines accept one or more of the following options,430+ both [haml](http://github.com/visionmedia/haml.js) and [jade](http://github.com/visionmedia/jade) accept all:431+432+ - _context|scope_ Template evaluation context (_this_)433+ - _locals_ Object containing local variables434+ - _filename_ Filename used for the _cache_ option435+ - _cache_ Cache intermediate JavaScript in memory436+ - _debug_ Output debugging information437+438 ### app.set(name[, val])439 440 Apply an application level setting _name_ to _val_, or441 get the value of _name_ when _val_ is not present:90 unmodified linesmodified:docs/index.html+1 added-1 removed
122 unmodified lines123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127- padding: 1px 0;127+ padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;100 unmodified linesmodified:docs/migrate.html+1 added-1 removed
122 unmodified lines123 background: rgba(0,0,0,0.2);124 border-right: 1px solid rgba(255,255,255,0.05);125 }126 #toc li {127- padding: 1px 0;127+ padding: 0;128 list-style: none;129 }130 #toc li a {131 font-size: 11px;267 unmodified linesmodified:lib/express/view.js+1 added-1 removed
188 unmodified lines189 * 190 * Most engines accept one or more of the following options,191 * both _haml_ and _jade_ accept all:192 *193- * - `context` Template evaluation context (`this`)193+ * - `context|scope` Template evaluation context (`this`)194 * - `locals` Object containing local variables195 * - `filename` Filename used for the `cache` option196 * - `cache` Cache intermediate JavaScript in memory197 * - `debug` Output debugging information98 unmodified lines