I have got two modules: admin and application in first have:
'view_helper_config' => array(
'flashmessenger' => array(
'message_open_format' => '<div%s><button data-dismiss="alert" class="close" type="button">×</button>',
'message_separator_string' => '<br>',
'message_close_string' => '</div>'
),
),
in second have:
'view_helper_config' => array(
'flashmessenger' => array(
'message_open_format' => '<ul%s><li>',
'message_separator_string' => '<li></li>',
'message_close_string' => '</li></ul>'
),
),
and it's always merged. I would like to have on every module diffrent config. How can I do it?
Keep in mind that your module.config.php
files act a bit like cascading style sheets in that the first one gets loaded and then the settings in the subsequent files either supplement or replace the settings that were loaded by the previous files. The module.config.php
files get loaded in the order that the modules are listed in project\\config\\application.config
. In other words, the statements that you have included in two different files are equivalent to listing them one after another in the same module.config.php
.
There are several solutions to your question:
module.config.php
altogether). module.config.php
. Look at the documentation to learn how. layout.phtml
and set the strings in there . The solution above requires that you set the HTML strings in each and every view that you create, but the documentation says you can set them in any .phtml
. EdpModuleLayouts allows you to have separate, module-specific layouts; and you can create a different layout for each module and set your chosen HTML strings in each layout. class=”toggleFM”
in relevant tags and set the CSS settings to display: hidden;
accordingly so that in one module certain elements are rendered and in another module other elements are rendered. This is a convoluted solution, but it allows you to set the HTML strings in your module.config.php
files if that's what you want to do. Also, take a look at your separator string. You probably want '</li><li>'
and not '<li></li>'
because the separator closes a list item and opens another.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.