visiosoft/addblock-extension

此包的最新版本(1.5.2)没有可用的许可证信息。

安装次数: 7,584

依赖项: 1

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:streams-addon

1.5.2 2023-11-11 17:19 UTC

This package is auto-updated.

Last update: 2024-08-30 22:06:42 UTC


README

允许您从另一个模块向指定区域添加扩展。

  • advs-module/ad-detail/partials/author-button

          {{ addBlock('ad-detail/partials/author-button', {'adv_id': adv.id})|raw }}
    
  • advs-module/list/partials/ads

          {{ addBlock('ad-list/partials/ads',{'featured_advs':featured_advs})|raw }}
    
  • profile-module/profile/partials/navigation

          {{ addBlock('profile/navigation')|raw }}
    
  • advs-module/ad-detail/partials/detail

          {{ addBlock('ad-detail/seller/action',{'adv':adv})|raw }}
    
  • advs-module/ad-detail/detail

          {{ addBlock('ad-detail/title/action',{'adv':adv})|raw }}
    
  • profile-module/profile/partials/navigation

          {{ addBlock('profile/navigation')|raw }}
    
  • advs-module/new-ad/new-create

          {{ addBlock('new-ad/fields')|raw }}
    

## 使用

    {{ addBlock('twig_dosya_adi',{'veri1':veri1,veri2:veri2,...})|raw }}

例如;

将Adv模块的发布详情页面的通信区域添加Message模块的按钮。

advs-module/resources/views/ad-detail/partials/detail.twig

51.<--> 63.

                <!-- Contact With Block -->
                {% set contactWith = addBlock('ad-detail/contact-with',{'adv':adv}) %}
                {% if contactWith != "" %}
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 offered-field offered-row">
                        <div class="row">
                            <div class="col-md-12 mt-2">
                                <h4><u>{{ trans('visiosoft.module.advs::field.contact_with') }}:</u></h4>
                            </div>
                            {{ contactWith|raw }}
                        </div>
                    </div>
                {% endif %}
                <!-- Contact With Block -->

指定的区域将在所有模块的views目录内自动查找"ad-detail/contact-with.twig"文件。找到的twig文件将被自动添加到addBlock区域。

添加的twig文件示例;

profile-module/resources/views/ad-detail-contact-with.twig

在示例中,电话信息被添加到发布详情页面。

##support@visiosoft.com.tr

www.visiosoft.com.tr