0

I've been trying to find the phtml file that I need to override in order to edit the homepage content - the bit that says "CMS homepage content goes here.". I can't seem to find the right template file to override, does anyone know where it is? I've been looking in magento/module_cms is that the right place?

  • I have a custom theme set up
  • It's parent is the blank theme
  • The theme is working properly - I've managed to edit the header and footer template and layout files.
1

"CMS homepage content goes here." means that page is created by Magento's CMS functionality. It is not stored in .phtml file but in database.

To edit content of this page go to

Store's Backend > Content > Pages > Home page

EDITED

To replace content with .phtml file, you can use Layout Update. Open Design section on Home Page edit form and insert next code in Layout Update XML field.

<referenceContainer name="content">
    <block class="Magento\Framework\View\Element\Template" name="your.name.for.block" template="Your_Module::template.phtml"/>
</referenceContainer>

Clean cache.

| improve this answer | |
  • So in order to add content using a phtml file I'd have to create my own block? – Matt Jan 22 '17 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.