0

login to magento admin. Open any cms page and write block code in content section.

{{block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::test.phtml"}} After using the block code phtml file will be called on cms page but after Footer.

How can we call before footer

asked Sep 16, 2022 at 16:49
8
  • Can you let me know how you added the block to the cms page? Usually, it will be before the footer. You know you can edit the content in the admin. I mean, it's ordered like this Header, Content, and Footer. Commented Sep 16, 2022 at 17:33
  • I added phtml file then i created new cms page and added below code {{block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::test.phtml"}} prnt.sc/RRuD32GqgXJP Commented Sep 16, 2022 at 18:30
  • Ok, And it is added after the footer block? Commented Sep 16, 2022 at 18:47
  • no prnt.sc/zrmq5zhQSr2A Commented Sep 16, 2022 at 19:05
  • You don't understand. Is it added after the footer block? Commented Sep 17, 2022 at 3:49

1 Answer 1

0

You can achieve this by adding the widget.

  1. Add widget

  2. Select Type (CMS Static Block)

  3. Select Theme (Your Theme)

  4. Widget Title

  5. Assign to Store View

  6. Click on Add Layout Update

  7. Display on All Pages

  8. Select Before Page footer from Container

  9. Change the section to Widget Options

  10. Select the Static Block

  11. Click on Save.

Clear the cache and navigate your browser to view.

enter image description here

Now you can view your block before the page footer.

answered Sep 19, 2022 at 4:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.