Reference a variable from another liquid file

Highlighted
New Member
1 0 0

Hello,

I got a variable which splits my description into different areas.

Problem is my variable needs to be in another .liquid file. It was how prestige theme was set up.

The description above Add to Cart is in the Product-Meta.liquid file. and the second description I need it to be in the Product-Template.liquid file.

What's in my Product-Meta.Liquid File

{% assign description__split = product.description | replace: 'data-section-type', 'data-section-type-placeholder' | split: "--split--" %}
{{ description__split[0] }}

How do I reference the above varible in my Product-Template.liquid? Below is what I currently got.

<div>

{{ description__split[1] }}

</div>

0 Likes