Wednesday 4 July 2018

Check AND /OR use in twig file.

Check AND /OR use in twig file, look at the syntax..

For OR Syntax..

{% if content.field_machine_name|render or content.field_machine_name|render %}
        /* write comment here */
{% endif %}

For AND Syntax..
 
{% if content.field_machine_name|render and content.field_machine_name|render %}
        /* write comment here */
{% endif %} 

Note: If have any suggestions or issue regarding 'Check AND /OR use in twig file' then you can ask by comments.

No comments:

Post a Comment

How to resolve max execution time error in drupal ?

When you found error regarding 'max_execution_time' exceed, then you can follow steps for resolve this error: Steps:   You can put t...