2

I've read about a folder structure discrepancy depending on how you install your Magento 2 which would cause the app/design themes to be moved into a vendor/magento/ folder.

Magento 2 - discrepancy between documentation and theme files structure on github

However my theme files seem to be located in pub/static/frontend/...

which has worked fine for me as far as copying the blank theme & then altering it, however i have come to remove the subscription form from the footer of the site & it seems to be ignoring my layout file.

I've found the Magento_Newsletter module using the template path hints & followed documentation to create a /pub/static/frontend/<vendor>/<template>/en_GB/Magento_Newsletter/layout/default.xml file within my theme containing:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="form.subscribe" remove="true" />
</body>

So my question is 2 fold:

1) am i wrong to be building a theme in the pub/static folder

2) have i placed the default.xml file in the wrong folder or am i removing the block in the wrong way?

Thanks for any input.

1 Answer 1

4

for question 1 yes you are wrong to build a theme in pub/static folder.

the theme will be create app/design/frontend/packagename/yourtheme. when you correct your theme location then xml also taking effect.

here is some tutorial for creating a theme

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-create.html

2
  • 1
    Thanks, can i still duplicate the contents of /vendor/magento/theme-frontend-blank into the app/design/frontend folder and use that as a starting point or will that not work?
    – Ben
    Commented Jan 18, 2016 at 11:13
  • yes you can duplicate blank theme contents in your theme. Commented Jan 18, 2016 at 11:14

Your Answer

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

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