cancel
Showing results for 
Search instead for 
Did you mean: 

Moving an HTML Source element to desired spot on page? Advice would be greatly appreciated

Moving an HTML Source element to desired spot on page? Advice would be greatly appreciated

Hi, I am trying to place a contact form (Copied the code from Hubspot) to an open area on our websites pages.

I go to: catalog - categories - click the desired category page I want the page to be on - content - html - copy and paste the code at the top of the line.

The form is showing up great however its placed at the top of the category page, I want it to be in the open space on the right, can anyone advise how I can get it to fill in where I need it to be?

Would be insanely appreciated, thanks.

1 REPLY 1

Re: Moving an HTML Source element to desired spot on page? Advice would be greatly appreciated

Hi @somnicfernas_so 

 

You can create a static block from admin and then override the vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml in your theme and place below code in it.

 

<referenceContainer name="sidebar.main">
        <block class="Magento\Cms\Block\Block" name="Your_CMS_Block">
            <arguments>
                <argument name="block_id" xsi:type="string">Your_CMS_Block</argument>
            </arguments>
        </block>
 </referenceContainer>

Hope it helps!

 

Thanks

---
If you've found my answer useful, please give"Kudos" and "Accept as Solution".