# Radius 0.0.1 -- Powerful Tag-Based Templates

**URL:** <https://www.ruby-forum.com/t/radius-0-0-1-powerful-tag-based-templates/95953>\
**Category:** Ruby\
**Created:** [January 22, 2006, 6:20am UTC](https://www.ruby-forum.com/t/radius-0-0-1-powerful-tag-based-templates/95953 "2006-01-22T06:20:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [January 22, 2006, 6:20am UTC](https://www.ruby-forum.com/t/radius-0-0-1-powerful-tag-based-templates/95953/1 "2006-01-22T06:20:05Z")

</div>

I am pleased to announce the immediate release of Radius 0.0.1. This is  
very beta right now, but I wanted to release it so that I could begin  
getting feedback.

Radius is a small, but powerful tag-based template language for Ruby  
inspired by the template languages used in MovableType  
\<[www.movabletype.org](http://www.movabletype.org)\> and TextPattern \<[www.textpattern.com](http://www.textpattern.com)\>. It uses  
tags similar to HTML, but can be used to generate any form of plain text  
(XML, e-mail, etc…).

Download:  
[http://rubyforge.org/frs/?group\_id=1262](http://rubyforge.org/frs/?group_id=1262)

Documentation:  
[http://radius.rubyforge.org](http://radius.rubyforge.org)

Instalation:  
% gem install radius

A small usage example:

class ThreeStoogesContext \< Radius::Context  
def initialize  
@prefix = ‘ts’  
end  
def stooge(attr)  
content = ‘’  
[“Larry”, “Moe”, “Curly”].each do |name|  
@name = name  
content \<\< yield  
end  
content  
end  
def name(attr)  
@name  
end  
end

parser = Radius::Parser.new(ThreeStoogesContext.new)

template = \<\<-TEMPLATE

- 

 TEMPLATE

puts parser.parse(template)

This will output:

```
 <li>Larry</li>

 <li>Moe</li>

 <li>Curly</li>

```

Learn more by reading the Quick Start guide:  
[http://radius.rubyforge.org/files/QUICKSTART.html](http://radius.rubyforge.org/files/QUICKSTART.html)

Enjoy!

---

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [January 22, 2006, 8:20am UTC](https://www.ruby-forum.com/t/radius-0-0-1-powerful-tag-based-templates/95953/2 "2006-01-22T08:20:58Z")

</div>

This looks a lot like PHPTAL.

[http://phptal.motion-twin.com/](http://phptal.motion-twin.com/)

Nice work. Would love to see a .rad extension for Rails at some point 🙂

-Nb

```auto
 Nathaniel S. H. Brown http://nshb.net

```

---

<div class="post-metadata">

**Author:** ![John\_WSLong](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/34f0e0/32.png) [@John\_WSLong](https://www.ruby-forum.com/u/John_WSLong)\
**Post date:** [January 22, 2006, 3:20pm UTC](https://www.ruby-forum.com/t/radius-0-0-1-powerful-tag-based-templates/95953/3 "2006-01-22T15:20:36Z")

</div>

Nathaniel S. H. Brown wrote:

> This looks a lot like PHPTAL.
> 
> [http://phptal.motion-twin.com/](http://phptal.motion-twin.com/)

I’m a little partial to the radius syntax. 🙂

> Nice work. Would love to see a .rad extension for Rails at some point 🙂

Someone is already working on a plugin for it, so perhaps it won’t be  
too much longer.
