Search code examples
ruby-on-railsruby-on-rails-3refinerycms

RefineryCMS - Page Templates of Page-Parts possible?


Im looking at Rails based CMS's, Refinery looks very nice, clean and simple however I cant find any clarification if templating is possible, or is to be included.

Ive found this pull request. Is this feature now available?

Ive also been looking at Locomotive but the documentation is very sparse at best.

Thanks.

Edit - Sorry, there was not enough of an explanation of what I meant by a template. Is it possible to define the page-parts that a certain page has. Eg I add a "City" page type, which has 5 page-parts, Name, Postcode, Description, Longitude and Latitude. So when a user adds a page, they then choose a page type, in this case a City and that has the pre-defined page-parts in it.

I have seen the copywriting but it does not appear possible to pre-define things when adding a new page.


Solution

  • You could add up layout.css in your stylesheets directory and it will automatically get picked up.

    check out this railscast episode for more information.

    Edit:

    You could use the rails g refinery:engine city name:string ....

    It will generate a whole bunch of stuff, follow the instructions printed by this command and you could see a new admin page to CRUD cities and a new app with views to set the HTML of show/index pages.