Replies: 2 comments 2 replies
-
|
Hi, To who could be interested, I have modified the following classes to make it work with the scenario above. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Does it work if you write it like this: -{% pimcoreblock blockName default(defaultItems) reload(true) %}
+{% pimcoreblock (blockName) default(defaultItems) reload(true) %}
...
{% endpimcoreblock %}At least when you want to use expressions as keys in a mapping, you have to wrap it in parentheses. Maybe it works here, too? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am migrating to the latest Pimcore version and trying to replace the pimcore_block extension with the pimcoreblock tag. I am currently facing an issue, since I have used the pimcoreblock in a snippet that I include in other templates when I pass as parameter the name of the block and the options.
The issue I am facing is that with the pimcoreblock tag it is not recognizing the name of the block.
I have this in my snippet:
{% pimcoreblock blockName default(defaultItems) reload(true) %}
...
{% endpimcoreblock %}
And in my master template I have:
{% include '/includes/snippet.html.twig' with {
'blockName': 'myTopBlock',
'defaultItems': 6
} %}
....
{% include '/includes/snippet.html.twig' with {
'blockName': 'myBottomBlock',
'defaultItems': 6
} %}
Doing that I get the error that the blockName must be a string.
Is there a way to do this with the new tag or should I step back and keep using the old extension pimcore_block that is working fine ?
Beta Was this translation helpful? Give feedback.
All reactions