Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockware contribution not working as expected #32

Closed
reutli opened this issue Jan 8, 2021 · 11 comments
Closed

Dockware contribution not working as expected #32

reutli opened this issue Jan 8, 2021 · 11 comments

Comments

@reutli
Copy link

reutli commented Jan 8, 2021

I installed the dockware/dev successfully.
As I missed the psh.phar and linked platform folder, I switched to dockware/contribution.

Afterwards I made a Plugin and activated it - so far so good.
But TWIGs within my PlugIn are not read.

So I've searched for /config/packages/twig.yaml but it's not there?!

What is wrong with my environment and what's the difference between dockware/dev and dockware/contribution?
If I use dockware/dev then psh.phar and /platform is missing...

What I'm needing is just a full dev environment with all the tools, the correct template so I'd be able to develop a theme-plugin.
As for now (with dockware/contribution) my PgligIn is installed and activated but a html-twig is not used in my plugIn, although it's in the right place:

Bildschirmfoto 2021-01-08 um 09 06 09

@reutli
Copy link
Author

reutli commented Jan 8, 2021

Now I made a complete new container with dockware/dev (knowing /platform and psh.phar is missing).
Integrated the PlugIn again, activated it, and activated the theme in Admin.

tabs.html.twig is still not read in, although it's there:
www-data@0c4096fc9e32:~/html/custom/plugins/Tbcom/src/Resources/views/storefront/page/product-detail$ ls -la total 8 drwxr-xr-x 2 www-data www-data 4096 Jan 8 11:28 . drwxr-xr-x 3 www-data www-data 4096 Jan 8 11:28 .. -rw-r--r-- 1 www-data www-data 0 Jan 8 11:31 tabs.html.twig

Sure, I cleared cache (bin/console cache:clear) ;o)

Please help.

@reutli
Copy link
Author

reutli commented Jan 11, 2021

I'd like to push that issue, because no dev possible :o(

@martinweinmayr
Copy link
Collaborator

can you upload your plugin here?
i don't really think that its not working.
If your file is there and you load it properly in your plugin it should work.

@reutli
Copy link
Author

reutli commented Jan 11, 2021

Here we are.
Awaited reaction of front-end: Tabs are gone. But they're still there although a clean "tabs.html.twig" is loaded.
Tbcom.zip

@martinweinmayr
Copy link
Collaborator

martinweinmayr commented Jan 12, 2021

  1. You have to change in your theme.json on Line 7
    "@tbcom" => "@Tbcom"
  2. you have to add a base.html.twig with
    {% sw_extends "@Storefront/storefront/base.html.twig" %}
  3. assign your theme to your saleschannel(s)

cheers

ps. this has nothing todo with dockware, this is basic shopware 6 way how themes are working.

@reutli
Copy link
Author

reutli commented Jan 12, 2021

Oh, then I must apologize if that was on me....!
Nevertheless, a point is not clear to me, because I have also not found in the documentation:
"you have to add a base.html.twig with
{% sw_extends "@Storefront/storefront/base.html.twig" %}"
Why and where does this need to be stored?

I didn't find this hint in the doc.
Maybe you can help me on this point?

Thanks a lot

@martinweinmayr
Copy link
Collaborator

Nope, but if i do not i get a error with something like "base..." not found.
So with it it works for me, as attached.
Normally i think it's not needed but i got it work with one line, so i was happy :-)
But the main goal was the Lower Uppercase typo.
If you only change this and assign your theme you will see what happens...

Tbcom.zip

@reutli
Copy link
Author

reutli commented Jan 12, 2021

great thanks for this outstanding support for a beginner !!!
Will try and learn ;o)

@martinweinmayr
Copy link
Collaborator

you are welcome!
Did it worked now also for you?

@reutli
Copy link
Author

reutli commented Jan 12, 2021

To my shame, I have to admit that I can't currently test it. I will test it this afternoon. Thanks again. If it does not work I would contact you again ;o)

@reutli
Copy link
Author

reutli commented Jan 12, 2021

it works! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants