GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

Bug with contains and notContains operators in #checkIf #1345

Closed dziudek closed 4 months ago

dziudek commented 4 months ago

Discussed in https://github.com/GetPublii/Publii/discussions/1338

Originally posted by **heyadlx** February 7, 2024 I'm looking for an answer to this question: https://forum.getpublii.com/topic/checkifany-helper-for-multiple-id-tag/ I tried this : `{{#each tags}} {{#checkIf id 'notContains' [1,2,3]}}{{name}}{{/checkIf}} {{/each}}` But the result is full of "false" and not the tags Thank you in advance
dziudek commented 4 months ago

contains and notContains operators must be fixed to convert string into array and dynamically cast values to specific type according to the second argument type