Search
 
SCRIPT & CODE EXAMPLE
 

PHP

magento2 add static block in phtml

<?= $block->getChildHtml('my-main-phtml-block-cms') ?>
Comment

magento2 add static block in phtml

<referenceBlock name="my-main-phtml-block">    <block class="MagentoCmsBlockBlock" name="my-main-phtml-block-cms">        <arguments>            <argument name="block_id" xsi:type="string">my_cmsblock_identifier</argument>        </arguments>    </block></referenceBlock>
Comment

magento 2 add in static block

<?php    echo $this->getLayout()        ->createBlock(MagentoCmsBlockBlock::class)        ->setBlockId('my_cmsblock_identifier') //replace my_cmsblock_identifier with real CMS bock identifier        ->toHtml();?>
Comment

PREVIOUS NEXT
Code Example
Php :: guzzlehttp http_errors get 
Php :: does xampp install php 
Php :: remove php 
Php :: how to enable auto refresh on save 
Php :: Bootstrap paginator css not appearing 
Php :: wp_delete_attachment unlink 
Php :: pass the product name to form field cf7 woocommerce 
Php :: jsondecode 
Php :: laravel get last created id 
Php :: save big data with laravel 
Php :: How to go back to the main page in php 
Php :: laravel make api resource 
Php :: clear log file laravel 
Php :: php enablem mod 
Php :: laravel route regex except 
Php :: add filter in wordpress 
Php :: netchain media 
Php :: numbers not displaying in laravel pagination 
Php :: how to get full path of uploaded file in php 
Php :: php RFC3339 
Php :: laravel stack script 
Php :: mage log equivalent magento 2 
Php :: function to find the mod of a number in php 
Php :: laravel add parameter to request 
Php :: API call in PHP using cURL 
Php :: displaying php errors 
Php :: error_reporting(E_ERROR) 
Php :: laravel 8 logout 419 page expired 
Php :: laravel collection all 
Php :: php reverse string 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =