0

I am using locomotive cms for our new project. Which uses rails 3.2.13, Ruby 1.9.3 and mongodb.

As client wants to edit some of the pages(around 10), so we decided to integrate locomotive to existing rails app.

Problem we found here is not able to inherit any of pages from application.html.

Do we need to write separate html in locomotive index also or is there any way to interact between cms and our rails app.

we totally confused as this is my first cms integration to rails

Thank you in advance

devudilip
  • 1,270
  • 14
  • 25

2 Answers2

1

I don't think that there is a way to do this. All of the layouts for locomotive are stored in the database and the rendering process is completely separate and different from the rails rendering process. I think the simplest way would just be to copy the application.html into the index layout adding in the necessary liquid blocks.

Charlie Greene
  • 465
  • 4
  • 11
  • Thanks Charlie Greene, >So we should maintain same pages twice ? >like contact page code in rails and as well in locomotive liquid ? >So dont we have any chance to respond to rails from locomotive? – devudilip Jan 08 '14 at 06:53
  • I haven't done many app and cms intergrations. We mostly just use the cms but I think that you should be able to just maintain the application layout twice (once as the rails app and one as the index page in locomotive) and then maintain the pages you want to have access to via the CMS just in locomotive. You may have to do something with the routing to make sure that your rails pages are displayed. – Charlie Greene Jan 08 '14 at 18:32
  • As of now i could make cms work by using layout twice(in rails and locomotive). Hope i will find other solution – devudilip Jan 09 '14 at 13:14
0

layout will auto rendered to the same name controller,and this will override application layout.

you can appoint the views to use which layout by adding

layout 'application'

to the controller which you want to use application layout

Chance Door
  • 221
  • 1
  • 6