# Setting page attributes

**URL:** <https://www.ruby-forum.com/t/setting-page-attributes/189960>\
**Category:** Radiant CMS\
**Created:** [June 10, 2010, 4:31pm UTC](https://www.ruby-forum.com/t/setting-page-attributes/189960 "2010-06-10T16:31:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aleee\_it](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@aleee\_it](https://www.ruby-forum.com/u/aleee_it)\
**Post date:** [June 10, 2010, 4:31pm UTC](https://www.ruby-forum.com/t/setting-page-attributes/189960/1 "2010-06-10T16:31:00Z")

</div>

Hi,

I’m new on the forum.

I’ve a simple custom page :

class MyPage \< Page

# 

end

I want to set the page attributes (title, description, keywords).  
I try this code :  
tag.locals.page.title = “hello my page”  
or  
Page.title = “hello my page”

but is not good.

Anyone can help me ?

Thk  
Alessandro

---

<div class="post-metadata">

**Author:** ![aleee\_it](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f04885/32.png) [@aleee\_it](https://www.ruby-forum.com/u/aleee_it)\
**Post date:** [June 11, 2010, 10:26am UTC](https://www.ruby-forum.com/t/setting-page-attributes/189960/2 "2010-06-11T10:26:19Z")

</div>

Alessandro A. wrote:

> Hi,
> 
> I’m new on the forum.
> 
> I’ve a simple custom page :
> 
> class MyPage \< Page
> 
> # 
> 
> end
> 
> I want to set the page attributes (title, description, keywords).  
> I try this code :  
> tag.locals.page.title = “hello my page”  
> or  
> Page.title = “hello my page”
> 
> but is not good.
> 
> Anyone can help me ?
> 
> Thk  
> Alessandro

Hi,

i think that i’ve found a solution :  
class MyPage \< Page  
attr\_accesstor :title

```
   def title
    #something
   end

end

```

Bye
