Sha256: 40148633535f308d721aa5b3a738d4110885832f30f430c5bba60dcf57b133dd

Contents?: true

Size: 1.97 KB

Versions: 31

Compression:

Stored size: 1.97 KB

Contents

<!DOCTYPE html>
<html>
	<head>
		
			<title>Content - Utopia</title>
		
		<meta charset="UTF-8"/>
		
		<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"/>
		
		<link rel="icon" type="image/png" href="../../../_static/icon.png"/>
		<link rel="stylesheet" href="../../../_static/site.css" type="text/css" media="screen"/>
		
		<script src="../../../_components/jquery/jquery.min.js"></script>
		<script src="../../../_components/jquery-syntax/jquery.syntax.min.js"></script>
		
		<script type="text/javascript">
		//<![CDATA[
			jQuery(function($) {
				$.syntax();
			});
		//]]>
		</script>
	</head>

	<body class="">
		<header>
			<img src="../../../_static/utopia.svg"/>
		</header>

		<div id="page">
			
	<nav>
	 › <a href="../../../wiki.html">Wiki</a> › <span>Middleware</span> › <a href="../content.html">Content</a></nav>

	
	<h1 id="content">Content</h1>
<p>A tag based content generation system which integrates nicely with HTML5. Supports structures which separate generic page templates from dynamically generated content in an easy and consistent way.</p>

<pre><code class="language-ruby">use Utopia::Content,
	cache_templates: (RACK_ENV == :production)
</code></pre>

<p>A basic template <code>create.xnode</code> looks something like:</p>

<pre><code class="language-trenni">&lt;content:page&gt;
	&lt;content:heading&gt;Create User&lt;/content:heading&gt;
	&lt;form action=&quot;#&quot;&gt;
		&lt;input name=&quot;name&quot; /&gt;
		&lt;input type=&quot;submit&quot; /&gt;
	&lt;/form&gt;
&lt;/content:page&gt;
</code></pre>

<p>This template would typically be designed with supporting <code>_page.xnode</code> and <code>_heading.xnode</code> in the same directory or, more typically, somewhere further up the directory hierarchy.</p>

	
	<footer>
		Last Modified: 2017-05-03 14:21:19 +1200 —
	</footer>

		</div>
	</body>
</html>

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
utopia-2.13.4 docs/wiki/middleware/content/index.html
utopia-2.13.3 docs/wiki/middleware/content/index.html
utopia-2.13.2 docs/wiki/middleware/content/index.html
utopia-2.13.1 docs/wiki/middleware/content/index.html
utopia-2.13.0 docs/wiki/middleware/content/index.html
utopia-2.12.4 docs/wiki/middleware/content/index.html
utopia-2.12.3 docs/wiki/middleware/content/index.html
utopia-2.12.2 docs/wiki/middleware/content/index.html
utopia-2.12.1 docs/wiki/middleware/content/index.html
utopia-2.12.0 docs/wiki/middleware/content/index.html
utopia-2.11.1 docs/wiki/middleware/content/index.html
utopia-2.11.0 docs/wiki/middleware/content/index.html
utopia-2.10.0 docs/wiki/middleware/content/index.html
utopia-2.9.5 docs/wiki/middleware/content/index.html
utopia-2.9.3 docs/wiki/middleware/content/index.html
utopia-2.9.2 docs/wiki/middleware/content/index.html
utopia-2.9.1 docs/wiki/middleware/content/index.html
utopia-2.9.0 docs/wiki/middleware/content/index.html
utopia-2.8.2 docs/wiki/middleware/content/index.html
utopia-2.8.1 docs/wiki/middleware/content/index.html