Frage

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

War es hilfreich?

Lösung

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.

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top