# Calling a radius tag from my custom tag

**URL:** <https://www.ruby-forum.com/t/calling-a-radius-tag-from-my-custom-tag/140820>\
**Category:** Radiant CMS\
**Created:** [June 18, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/calling-a-radius-tag-from-my-custom-tag/140820 "2008-06-18T22:59:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [June 18, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/calling-a-radius-tag-from-my-custom-tag/140820/1 "2008-06-18T22:59:51Z")

</div>

Lets say I create a custom tag in an extension: \<r:foo /\>

I want that tag to basically wrap some HTML around an existing radius  
tag. In non working psuedo code:

tag ‘foo’ do  
“Foo title: \<r:title /\>”  
end

In this contrived example, I could just use the ruby objects available  
to the tag, but I want to encapsulate more complex radius tags. Things  
like \<r:navigation\> for instance.

There has to be a simple way to do this, I just can’t quite figure out  
the syntax.

---

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [June 18, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/calling-a-radius-tag-from-my-custom-tag/140820/2 "2008-06-18T23:07:18Z")

</div>

Alex,

“Foo title: #{render\_tag(‘title’)}” should work.

Sean

---

<div class="post-metadata">

**Author:** ![squeegy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/dec6dc/32.png) [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Post date:** [June 18, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/calling-a-radius-tag-from-my-custom-tag/140820/3 "2008-06-18T23:15:27Z")

</div>

Sean C. wrote:

> Alex,
> 
> “Foo title: #{render\_tag(‘title’)}” should work.
> 
> Sean

Thanks I think I found it here:  
[http://github.com/seancribbs/radiant/tree/master/radiant/app/models/page\_context.rb#L14](http://github.com/seancribbs/radiant/tree/master/radiant/app/models/page_context.rb#L14)

I should be able to add attributes and content to the tag with a hash  
and black right?

render\_tag(‘foobar’, :baz =\> ‘asdf’) do  
“Tag content”  
end

Thansk for the help!
