exalead:examples
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| exalead:examples [2021/06/09 13:45] – [Split de metas] nicoanto | exalead:examples [2022/11/03 07:35] (Version actuelle) – nicoanto | ||
|---|---|---|---|
| Ligne 27: | Ligne 27: | ||
| ${else} | ${else} | ||
| ${entry.metas[' | ${entry.metas[' | ||
| + | </ | ||
| + | |||
| + | ==== Conditional display ==== | ||
| + | |||
| + | Test if value from meta list contains a specific value | ||
| + | < | ||
| + | ${var: | ||
| + | ${foreach facetclass in feeds[' | ||
| + | ${if (str: | ||
| + | ${var: | ||
| + | ${/if} | ||
| + | ${/foreach} | ||
| + | ${var: | ||
| </ | </ | ||
| Ligne 43: | Ligne 56: | ||
| {{:: | {{:: | ||
| + | === Feed Query === | ||
| + | Do a query on each of the words of query and ecah of the comma separated words : | ||
| + | < | ||
| + | ${if page.params[' | ||
| + | ( | ||
| + | | ||
| + | ${if str: | ||
| + | | ||
| + | ${if loop.index != 0} OR ${/if} | ||
| + | hpc_system_syetem_name:" | ||
| + | | ||
| + | ${else} | ||
| + | ${if loop.index != 0} OR ${/if} | ||
| + | | ||
| + | ${/if} | ||
| + | | ||
| + | ) OR ${page.params[' | ||
| + | ${/if} | ||
| + | </ | ||
| ===== Conso / JEXL ===== | ===== Conso / JEXL ===== | ||
| + | |||
| + | [[https:// | ||
| + | ==== Split String into list ==== | ||
| + | var array = new(" | ||
| + | array = meta.marketing_text.split(" | ||
| + | return array | ||
| ==== Count of items in a list meta ==== | ==== Count of items in a list meta ==== | ||
| - | < | + | < |
| + | var region_count=0; | ||
| + | for(v : bat_issue_region$l) { | ||
| + | | ||
| + | }; | ||
| + | return region_count | ||
| + | </ | ||
| ==== Split de metas ==== | ==== Split de metas ==== | ||
| Ligne 58: | Ligne 102: | ||
| } | } | ||
| return array</ | return array</ | ||
| + | |||
| + | ==== Replace string in list ==== | ||
| + | < | ||
| + | var array = new(" | ||
| + | for(v : meta.history$l) { | ||
| + | array.add(v.replaceAll(" | ||
| + | } | ||
| + | return array | ||
| + | </ | ||
exalead/examples.1623246340.txt.gz · Dernière modification : (modification externe)
