Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- app/code/Smarty/Zarpoo/view/frontend/layout/cms_index_index.xml -->
- <?xml version="1.0"?>
- <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
- <body>
- <referenceContainer name="content">
- <block class="Magento\Framework\View\Element\Template" template="Smarty_Zarpoo::index.phtml"/>
- </referenceContainer>
- </body>
- </page>
- <!-- app/code/Smarty/Zarpoo/view/frontend/templates/index.phtml -->
- <div id="m2-component" data-bind="scope:'m2kocomponent'">
- <!-- ko template: getTemplate() --><!-- /ko -->
- <script type="text/x-magento-init">
- {
- "#m2-component": {
- "Magento_Ui/js/core/app": {
- "components": {
- "m2kocomponent": {
- "component": "Smarty_Zarpoo/js/uicomponentjs",
- "template" : "Smarty_Zarpoo/m2kocomponent-template",
- "modulename ": "<?= $block->escapeJs($block->getModuleName()); ?>"
- }
- }
- }
- }
- }
- </script>
- </div>
- <!-- app/code/Smarty/Zarpoo/view/frontend/web/js/uicomponentjs.js -->
- define([
- 'jquery',
- 'uiComponent',
- 'Magento_Customer/js/model/authentication-popup'
- ], function ($, Component, popup) {
- 'use strict';
- popup.createPopUp($(‘#authenticationPopup’));
- popup.showModal();
- return Component.extend({
- initialize: function () {
- this._super();
- <!-- popup.showModal(); -->
- }
- });
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement