bubble-house/module-integration
最新稳定版本:v1.4.11
Composer 安装命令:
composer require bubble-house/module-integration
包简介
Bubblehouse Magento 2 Integration Module
README 文档
README
This Magento 2 widget allows you to display an iframe for the BubbleHouse Block API. You can customize the iframe by specifying parameters such as the page name and the height of the iframe.
Widget Configuration
The widget is defined in etc/widget.xml as follows:
<widget class="BubbleHouse\Integration\Block\Widget\Iframe" id="bubblehouse_block_api"> <label>Bubblehouse Integration Iframe</label> <description>Bubblehouse Block API iFrames</description> <parameters> <parameter name="page" xsi:type="text" required="false" visible="true" sort_order="10"> <label>Page</label> <value>Rewards7</value> </parameter> <parameter name="height" xsi:type="text" required="false" visible="true" sort_order="10"> <label>iFrame Height</label> <value>1700</value> </parameter> </parameters> </widget>
Widget Parameters
-
page: Text parameter (default "Rewards7") Enter the page (or endpoint) name that the iframe should load. -
height: Text parameter (default "1700") Define the height of the iframe in pixels.
How to Use the Widget
- Embedding in a
.phtmlTemplate:
<?php echo $block->getLayout() ->createBlock(\BubbleHouse\Integration\Block\Widget\Iframe::class) ->setTemplate('BubbleHouse_Integration::widget/iframe.phtml') ->setData([ 'title' => 'some title', 'page' => 'MyCustomPage', 'height' => '1200' ]) ->toHtml(); ?>
- Adding the Widget to a CMS Page or CMS Block:
Use this directive in the content editor:
{{widget type="BubbleHouse\Integration\Block\Widget\Iframe" page="MyCustomPage" height="1200"}}
- Inserting the Widget Using the Admin “Insert Widget” Tool:
- Go to Content > Pages (or Blocks) and edit a page or block.
- Click "Insert Widget".
- Select "Bubblehouse Integration Iframe".
- Set parameters: Page and iFrame Height.
- Click Insert Widget. Magento will insert the directive as shown above.
Final Notes
- Caching: Flush Magento caches after adding or updating widgets.
- Template Location: Make sure the widget template
iframe.phtmlis located inview/frontend/templates/widget/.
统计信息
- 总下载量: 698
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-05-22