Sha256: 7f0bf10de8da32b765e43d0fe0f4a0e770a94baa998ad8dc2de555c953e1e2a1

Contents?: true

Size: 916 Bytes

Versions: 2

Compression:

Stored size: 916 Bytes

Contents

<?xml version="1.0"?>

<!-- 
	A very simple page.
	All comments are removed from the output.
	This page uses XSLT because it is the prefered styling method
	for Nitro applications. XSLT is used in a very trivial way in
	this example. If you dont need the extra capabilities
	of XSLT use a NilShader for your app.
-->

<root 
	xmlns:x="http://www.navel.gr/xml/shader.xsd"
	xmlns:xl="http://www.w3.org/1999/xlink">

<?r
	# methods:
	P::Articles.del_article(request)

	articles = $db.get_all(N::Article)
?>

<!-- x:page is a trivial template, used as an example -->
<x:page>

<?r	if articles ?>
	<ul>
<?r	for article in articles ?>
		<li>
			<a href="articles/#{article.oid}">#{article.title}</a>
			<!-- @?... is a macro that creates a postback uri -->
			[<a href="@?del_article_oid=#{article.oid}">del</a>]
		</li>
<?r	end ?>
	</ul>
<?r	end ?>

<p>
	<a href="add-article.sx">Add article</a>
</p>

</x:page>

</root>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nitro-0.1.2 examples/simple/root/index.sx
nitro-0.2.0 examples/simple/root/index.sx