Search code examples
ruby-on-railsrefinerycms

Refinery CMS: Adding custom field to custom engine index page


i have generated a custom engine "Pianos" inside of refinery cms. On the index piano page, I'd like to display the content of a related custom field called "pianos_introduction_text".

What would be the correct way to generate and display this custom field?

Thanks for your help!


Solution

  • Our preference however is to create custom page parts in the normal pages section, rather than to use the copywriting engine.

    Under the pages admin section you should see that a page has been added for pianos. If you add a new page part (or even use an existing one), you can then retrieve and render it from the engine's index page like this:

    <%= raw @page.content_for(:new_page_part) %>