0

Ist there a "best practice" sollution for layouts in a multiple module application.

what its all about: i am trying to create an simple website as a little cms. that includes:

  • frontend module, which is just displaying content
  • backend module, in which i manage the content
  • guestbook module, alike the album in the zf2 tutorials
  • maybe some other.

now to my question: is it possible to have an central layout in the frontend-module which appears in all the other modules? i dont want to create for each module an own layout.

thanks in advance

1 Answer 1

1

What you're describing is how it works out of the box. By default ZF2 will try and render the layout layout/layout. So as long as you have that in your frontend module, it will be used by all other modules unless you specify otherwise.

Sign up to request clarification or add additional context in comments.

2 Comments

so i just leave the template_map definitions empty?
Yup. You can have modules with no layouts or views at all. Remember that the configs for all modules are ultimately merged into one monster config array, so it doesn't matter which module's config defines stuff.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.