0

I have followed the instructions found on the Guides for building a custom layout:

NOTE: The portfolio is an engine of my own, not the refinerycms-portfolio.

  1. config.layout_template_whitelist = ["application","portfolio"]
  2. config.use_layout_templates = true
  3. Created a portfolio.html.erb under app/views/layouts and copied everything from the application.html.erb except for the <header> section: I do not want the menu and logo shown in this layout, but all the rest
  4. I can now see the layouts in the back end.
  5. If I choose my portfolio page and press preview, the layout renders without the menu
  6. However, if I go directly to /portfolios, the 'application' layout renders and not the 'portfolio'

Any ideas please?

Thank you...

Cacofonix
  • 465
  • 11
  • 19

1 Answers1

0

Well, it seems that the namespacing introduced in the latest RefineryCMS versions prevents the layout to be picked up automatically, thus you need to manually instruct the Controller to pick up the layout in question. To this case I had to add:

render :layout => 'layouts/portfolio'

in my portfolios#index action.

Hope this helps...

Cacofonix
  • 465
  • 11
  • 19