This package adds a menu bar for .com+, providing links for the customer service team, to logout or act as a customer on FESK pages.
Prerequisite
FESK app must use the latest version of mns-fe-pattern-library or at least v9.13.0.
Installation
To install the module that will inject the dotcom plus menu into your fesk app run the following commands in your terminal and add css file link.
npm install --save handlebars
this is a peer dependency of the module
npm install --save @mands/dot-com-plus-menu
Add below in common.scss
@import '~@mands/dot-com-plus-menu/src/style.scss'
Usage
Example html output should look like below:
<script src="./static/dot-com-plus-menu.js"></script>
<script>
DotComPlusMenu.render("#target");
</script>
to achieve above you will need to add the js in your root file
for example in the store listing page we added the js like below in js file
import * as DotComPlusMenu from '@mands/dot-com-plus-menu';
try { DotComPlusMenu.render('#dcplus'); } catch (e) { console.warn(e.message); }
And updated the partials file to set the target like below:
<div id="dcplus"></div>
Please look in the example directory for full example usage with in a project.