2

What is the variable/method to address/fetch a particular content type in template files?

What variable/method shall I put at the blank space so my statement/logic will be like if contentType == 'article'?

{% if ____________ %}
  ......
  ........
{% endif %}

1 Answer 1

6

call the getType method of the node object, like: node.getType() == 'article'

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.