Meta Box
Support Forum
Support › MB Views › display variable value in another viewResolved
Hi, i am just declaring a variable in a view, and want to display it in another view, any idea how to do it ?
view one:
{% set val = 0 %} {{ val }} displays ok
view two: {{ val }} nothing displayed
{{ val }} nothing displayed
thanks
Hi,
Each view is a template, you can include to another view then use the declared variable in that view.
{% include 'view-name' %}
Please follow this article for more information https://metabox.io/mb-views-creating-including-template-parts/.