# Setting r:title from a custom extension

**URL:** <https://www.ruby-forum.com/t/setting-r-title-from-a-custom-extension/143599>\
**Category:** Radiant CMS\
**Created:** [July 21, 2008, 2:37am UTC](https://www.ruby-forum.com/t/setting-r-title-from-a-custom-extension/143599 "2008-07-21T02:37:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlpulley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@carlpulley](https://www.ruby-forum.com/u/carlpulley)\
**Post date:** [July 21, 2008, 2:37am UTC](https://www.ruby-forum.com/t/setting-r-title-from-a-custom-extension/143599/1 "2008-07-21T02:37:39Z")

</div>

Hi everyone.  
I have been using Radiant for a while, and have finally made an  
extension for a customer, but I have question for you all to help me put  
the final polish on it. Basically I want to know how to set r:title  
from my controller, or view?  
I noticed the summer reboot documentation effort is producing some good  
reference material, and I must thank all the contributors for that. I  
noticed that Sean is still in the progress of completing the section I  
would be after on this page  
[http://wiki.radiantcms.org/Creating\_an\_extension\_VI](http://wiki.radiantcms.org/Creating_an_extension_VI). Which was very  
helpful by the way.

Thanks,  
Carl Pattie.

---

<div class="post-metadata">

**Author:** ![carlpulley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@carlpulley](https://www.ruby-forum.com/u/carlpulley)\
**Post date:** [July 21, 2008, 4:35am UTC](https://www.ruby-forum.com/t/setting-r-title-from-a-custom-extension/143599/2 "2008-07-21T04:35:40Z")

</div>

You can set the @title instance variable somewhere in your controller or  
template or create a content\_for block in your template named :title:

\<% content\_for :title do %\>4-Minute Sweet Harmonious Biscuits\<% end %\>

Sean

---

<div class="post-metadata">

**Author:** ![carlpulley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/da6949/32.png) [@carlpulley](https://www.ruby-forum.com/u/carlpulley)\
**Post date:** [July 21, 2008, 5:25am UTC](https://www.ruby-forum.com/t/setting-r-title-from-a-custom-extension/143599/3 "2008-07-21T05:25:14Z")

</div>

Sean C. wrote:

> You can set the @title instance variable somewhere in your controller or  
> template or create a content\_for block in your template named :title:
> 
> \<% content\_for :title do %\>4-Minute Sweet Harmonious Biscuits\<% end %\>
> 
> Sean

Thanks Sean,  
That worked a treat. My extension has that final polish I was looking  
for.

Carl
