# Problem creating custom pages

**URL:** <https://www.ruby-forum.com/t/problem-creating-custom-pages/185694>\
**Category:** Radiant CMS\
**Created:** [March 24, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/problem-creating-custom-pages/185694 "2010-03-24T18:31:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lupimo\_m](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/f07891/32.png) [@lupimo\_m](https://www.ruby-forum.com/u/lupimo_m)\
**Post date:** [March 24, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/problem-creating-custom-pages/185694/1 "2010-03-24T18:31:58Z")

</div>

Hi,

in order to set up new page types i followed this tutorial  
[http://wiki.github.com/radiant/radiant/creating-a-custom-page-type](http://wiki.github.com/radiant/radiant/creating-a-custom-page-type)

“product” is the new extension, “ProductPage” the new page type

Everything worked well except the form creation with this partial in  
/vendor/extensions/product/app/views/admin/pages

- if @page.is\_a?(ProductPage)  
%table.fieldset
  - [‘product\_name’, ‘player\_license’, ‘product\_url’].each do |field|  
= render :partial =\> “meta\_row”,:locals =\> {:f =\> self}, :object  
=\> {:field =\> field, :type =\> “text\_field”, :args =\> [{:class =\>  
‘textbox’, :maxlength =\> 100}]}

The fields are properly displayed, but in the page source it looks like  
this:

 Product url 

```
 </th>
  <td class='field'>
   <input id="product_url_classtextboxmaxlength100"

```

name=“product\_url[classtextboxmaxlength100]” size=“30” type=“text” /\>

instead of page[product\_url] …  
So nothing is saved.

I suspect the problem ist the :locals =\> {:f =\> self} but what is the  
solution?

Many thanks
