Hi,
I get the same menu on both components when I use two components on one page. How can i solve this problem?
Code
{% component 'menu' %}
{% component 'foter' %}
Thank you! ^-^
Last updated
I'd love to know how to solve it :) I'm working on it now. I know what's going wrong but not why.
I've pushed an update that fixes the issue.
Basically, you need to do all the plugin calculations in the onRender method not the onRun method. The added advantage of using onRender is that you can then add variables in the component call like you can with partials. I wish I'd read this section of the docs a little bit closer.
Let me know if there are any problems with this.
@sercanvirlan
Definitely not a NestedSet bug. If you add two blog posts to a page you can see the same issue happening, in that the components get their parameters from the last component put on the page. That plugin (the rainlab one) also uses onRun, as there is the assumption that only one component of that type will ever be written to a template. Probably a safe assumption in that plugin's case.
1-9 of 9