zend framework2 - Zf2 change layout depending on loaded modules -


I have been searching for more than a week on the internet, but I can not find anything on this ... < / P>

So I thought I would like to ask a quick question here:

  Is it possible to modify the layout based on the module loaded in zf2? I mean, I have 3 modules: 1. Blog 2. Administrator 3.ads If I disable the blog from application.config.php, then is it possible to include a blog page to disappear in the menu page? Example:  

Before disabling the menu:

  | Blog | Administrator | After disabling the blog, the ad   

menu:

  | Administrator | Advertisement   

Is this possible? Thanks for your input !!

This is easily possible because all the layouts are rendered in the navigation. Your module should only be placed in one navigation configuration and add their entries to their own module.config.php . If the module is disabled, then the configuration will not be there and hence it will not be rendered at all.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -