recentpopularlog in

explanation

« earlier   
Ecommerce University | Shopify - using if statements within js.liquid files - Shopify Design
This forum contains a good explanation of why certain liquid template keywords like: {{ template }} do not return what you expect in .js.liquid files. So don't use it to try to detect the template from within the .js.liquid files. Instead, in the theme.liquid template, in the head tag do something like this:

<script>
var template = {{ template | json }};
</script>

and then use that variable in your JavaScripts that you include externally, like so:

if(template === 'index'){
console.log('homepage loaded');
}
shopify  ecommerce  university  forum  guide  reference  explanation  css  javascript  assets  template  detection  liquid  syntax  caveat  proviso  toread  tolearn  tounderstand 
8 days ago by racl101
Explaining Disease: Correlations, Causes, and Mechanisms
Why do people get sick? I argue that a disease explanation is best thought of as causal network instantiation, where a causal network describes the interrelations among multiple factors, and...
work  explanation  concepts 
16 days ago by przcrbll
Koch’s postulates: An interventionist perspective
We argue that Koch’s postulates are best understood within an interventionist account of causation, in the sense described in Woodward (2003). We show…
work  explanation  interventions 
16 days ago by przcrbll
Stability, breadth and guidance
Much recent work on explanation in the interventionist tradition emphasizes the explanatory value of stablecausal generalizations—i.e., causal generalizations that remain true in a wide range of...
work  explanation 
16 days ago by przcrbll

Copy this bookmark:





to read