call a snippet by e...
 
Notifications
Clear all

[Solved] call a snippet by excluding a DIV

3 Posts
2 Users
1 Reactions
330 Views
(@the-ecom-man)
Eminent Member
Joined: 5 years ago
Posts: 24
Topic starter  

Hi,

i am using Plak, and my question is a bit technical 😀

I would like to do some customization by myself, for this I need to call a snippet by excluding a DIV which exist in that snippet, how would I do that ?

Thanks in advance


   
Quote
plaktheme
(@plaktheme)
Reputable Member
Joined: 5 years ago
Posts: 0
 

Hi @the-ecom-man

Here is how to call a snippet without a specific DIV :

Let's say your snippet is of the form

Some code here

<div> DIV TO EXCLUDE </div>

Some code here
 
 
  • In the snippet, add a condition and give it a name, for example : show_thisdiv
... Some code here
{%
if show_thisdiv %} <div> DIV TO EXCLUDE </div> {% endif %}
... Some code here

 

  • then call the snippet by excluding the DIV

 

{% include 'YOU-SNIPPET', show_thisdiv: false %}

 

Kind regards, 

Katrine| Plak theme support
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as a Solved Solution

Katrine | Technical support at Plak, Scrowp & Vantout
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as a Solved Solution


   
the-ecom-man reacted
ReplyQuote
(@the-ecom-man)
Eminent Member
Joined: 5 years ago
Posts: 24
Topic starter  

Got it ! Thanks a lot Katrine 🙂


   
ReplyQuote
Share:

Welcome to the Shopify Forum Community provided by Plak ThemeLLC, a place where you can discuss about eCommerce and Shopify, solve technical issues, get help with Shopify Design, Apps integration, Marketing, Facebooks ad, Google ads and more.

Before posting, we invite you to read and follow the forum rules | We also support any questions related to Free Shopify themes :Dawn, Express, Minimal, Brooklyn, Narrative, Supply, Debut, Venture, Boundless and Simple