Hi, 

in order to set up new page types i followed this tutorial
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:

<tr>
    <th class='label'>
       <label for='page_product_url'>
          Product url
       </label>

     </th>
      <td class='field'>
       <input id="product_url_classtextboxmaxlength100"
name="product_url[classtextboxmaxlength100]" size="30" type="text" />
       </td>
</tr>

instead of page[product_url] ....
So nothing is saved.

I tried it with a collection, same result.
I think the problem ist the :locals => {:f => self} since self.class  is just 
ActionView::Base but what is the solution?

Many thanks



_______________________________________________
Radiant mailing list
Post: Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
List Site: http://lists.radiantcms.org/mailman/listinfo/radiant
Radiant: http://radiantcms.org
Extensions: http://ext.radiantcms.org

Reply via email to