Reading list Switch to dark mode

    Magento : Static Block Inside Phtml

    Updated 19 May 2017

    Magento : Static Block Inside Phtml : This is somehow a must trick for every magento developer. Static block are useful blocks in which you can put text , image and magento variables .Here is the code by which you can add static block inside phtml file

    <?php echo $this->getLayout()->createBlock(’cms/block’)->setBlockId(’my-new-block’)->toHtml() ?>

    Searching for an experienced
    Magento Company ?
    Find out More
    . . .

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home