Splitting description in Debut theme

Solved
Tourist
12 0 1

Champion! Works great, thanks :)

0 Likes
Tourist
12 0 1

The only thing that doesn't seem to work now is the featured product on the front page.
If I apply the same code in the featured-product.liquid it still doesn't seem to split it on the front page, only the product page?

0 Likes

Success.

Shopify Partner
181 25 48

Hi - glad it works. Had a quick look at using it on featured product and I got it working on my dev site.

 

Here's my code in 'featured-product.liquid', all it needed for me was an extra closing div '</div>'. See if that works for you.

 

 <div class="product-single__description rte" id="first_product_description">
          {% unless product == empty %}
            {{ product.description | split: '<!-- split -->' | first }}
          </div>
       </div>
      </div>
      
        <div class="product-single__description rte" id="last_product_description">
      {{ product.description | split: '<!-- split -->' | last }}
      </div>
          {% else %}
            {{ 'homepage.onboarding.product_description' | t }}
          {% endunless %}
        </div>

 

If helpful then please Like and Accept Solution
1 Like
Highlighted
Tourist
12 0 1

Magical, thank you :)

0 Likes
Shopify Partner
181 25 48
No problem, glad I could help.
If helpful then please Like and Accept Solution
0 Likes
Tourist
12 0 1

There's a new problem that comes with this.
Everything after the <!-- split -->  no longer has an indent.
So when I view the content after the <!-- split -->  on my product page on mobile it's touching the very left of the screen.

1 Like
Tourist
12 0 1

I had someone fix it for me :)

0 Likes
New Member
1 0 0

Hey ! Thanks for the great solution ! 

 

Would you please mind sharing how you fixed the issue with the indent? ;)

0 Likes