# If/else statements in radiant tags

**URL:** <https://www.ruby-forum.com/t/if-else-statements-in-radiant-tags/136261>\
**Category:** Radiant CMS\
**Created:** [April 30, 2008, 7:16am UTC](https://www.ruby-forum.com/t/if-else-statements-in-radiant-tags/136261 "2008-04-30T07:16:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![imakethings](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@imakethings](https://www.ruby-forum.com/u/imakethings)\
**Post date:** [April 30, 2008, 7:16am UTC](https://www.ruby-forum.com/t/if-else-statements-in-radiant-tags/136261/1 "2008-04-30T07:16:23Z")

</div>

Will Radius ever support if/else statements?

---

<div class="post-metadata">

**Author:** ![imakethings](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@imakethings](https://www.ruby-forum.com/u/imakethings)\
**Post date:** [April 30, 2008, 7:28am UTC](https://www.ruby-forum.com/t/if-else-statements-in-radiant-tags/136261/2 "2008-04-30T07:28:24Z")

</div>

Arik J. wrote:

> Will Radius ever support if/else statements?

I’d love to hear John and Sean’s latest thoughts on this. I’ve often  
felt that this was one of the main weak areas of Radius (and why there  
are now several \<r:if\_misc\_stuff\> tags to fill the void).

In the meantime, I have an extension that I developed to test this  
functionality (actually both conditionals and variable declarations).  
John has encouraged me to put it out there for more people to  
try/critique but I wanted to split the two functionalities up first (it  
was just a proof of concept for me).

Anyway, it is pretty usable (though it could use some lovin). You can  
get it here:  
[https://secure.svnrepository.com/s\_swanki/open/radiant/extensions/vars\_if/trunk/](https://secure.svnrepository.com/s_swanki/open/radiant/extensions/vars_if/trunk/)

Also, there is the Backdoor extension which basically opens up ERB into  
your tags so you can use all of ruby’s goodness within your tags. It  
also addresses the need for \<r:if\> tagging.

-Chris

---

<div class="post-metadata">

**Author:** ![imakethings](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@imakethings](https://www.ruby-forum.com/u/imakethings)\
**Post date:** [May 2, 2008, 3:16am UTC](https://www.ruby-forum.com/t/if-else-statements-in-radiant-tags/136261/3 "2008-05-02T03:16:55Z")

</div>

Speaking of code, the radiant admin page textareas could use some sort  
of tab-enabled feature so I can indent my heavily-dynamic (tons of  
indented code) pages. I’ve implemented this with decent results in every  
browser except the most recent betas of Firefox 3.

Chris P. wrote:

> Arik J. wrote:
> 
> > Will Radius ever support if/else statements?
> 
> I’d love to hear John and Sean’s latest thoughts on this. I’ve often  
> felt that this was one of the main weak areas of Radius (and why there  
> are now several \<r:if\_misc\_stuff\> tags to fill the void).
> 
> In the meantime, I have an extension that I developed to test this  
> functionality (actually both conditionals and variable declarations).  
> John has encouraged me to put it out there for more people to  
> try/critique but I wanted to split the two functionalities up first (it  
> was just a proof of concept for me).
> 
> Anyway, it is pretty usable (though it could use some lovin). You can  
> get it here:  
> [https://secure.svnrepository.com/s\_swanki/open/radiant/extensions/vars\_if/trunk/](https://secure.svnrepository.com/s_swanki/open/radiant/extensions/vars_if/trunk/)
> 
> Also, there is the Backdoor extension which basically opens up ERB into  
> your tags so you can use all of ruby’s goodness within your tags. It  
> also addresses the need for \<r:if\> tagging.
> 
> -Chris

---

<div class="post-metadata">

**Author:** ![imakethings](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/ce7236/32.png) [@imakethings](https://www.ruby-forum.com/u/imakethings)\
**Post date:** [May 2, 2008, 6:39am UTC](https://www.ruby-forum.com/t/if-else-statements-in-radiant-tags/136261/4 "2008-05-02T06:39:40Z")

</div>

On May 1, 2008, at 9:16 PM, Arik J. wrote:

> Speaking of code, the radiant admin page textareas could use some sort  
> of tab-enabled feature so I can indent my heavily-dynamic (tons of  
> indented code) pages. I’ve implemented this with decent results in  
> every  
> browser except the most recent betas of Firefox 3.

That sounds very interesting. Finish it off and send us a patch.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)
