From 4b33cfcb4c25a432a14fcc07f0dabce0ed31e926 Mon Sep 17 00:00:00 2001 From: thex Date: Thu, 28 Nov 2019 14:02:40 +0100 Subject: [PATCH 1/3] updated finder documentation to reflect #2561 --- .../05.advanced/10.content-in-particles/docs.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md b/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md index 8221c03..4131c52 100644 --- a/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md +++ b/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md @@ -168,6 +168,20 @@ Operation is one of: `>`, `>=`, `<`, `<=`, `=`, `BETWEEN`, `NOT BETWEEN`, `IN` a {% do finder.category([1,2,3]) %} ``` +### `.tags(tags, matchAll = false)` + +* `tags` Object that can contain tag `ids` as well as tag `titles` + * `ids` Either array of tag ids or single id + * `titles`Either array of tag titles or a single title +* `matchAll` Set *True* if you want to match an article against all specified tags, *false* if you want to match an article against any passed tag + +```twig +{% do finder.tags({ids: [1,2,3]}) %} +{% do finder.tags({titles: ['tag1','tag2','tag3']}) %} +``` + +**NOTE:** You can specify both `ids` as well as `titles` when using this routine. Please be aware that the `matchAll` parameter set to `true`will match all tags specified by id or title separately but not collectively. + # Category Object Category Object in an category instance with all the fields from the database. You can access the available fields, but there are also some functions to help you. From 3d7316b99f1706725738fc7ef96f6c2f69515491 Mon Sep 17 00:00:00 2001 From: thex Date: Thu, 28 Nov 2019 14:33:23 +0100 Subject: [PATCH 2/3] finder tags doc, fixed missing blank --- pages/01.gantry5/05.advanced/10.content-in-particles/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md b/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md index 4131c52..bc183bc 100644 --- a/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md +++ b/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md @@ -180,7 +180,7 @@ Operation is one of: `>`, `>=`, `<`, `<=`, `=`, `BETWEEN`, `NOT BETWEEN`, `IN` a {% do finder.tags({titles: ['tag1','tag2','tag3']}) %} ``` -**NOTE:** You can specify both `ids` as well as `titles` when using this routine. Please be aware that the `matchAll` parameter set to `true`will match all tags specified by id or title separately but not collectively. +**NOTE:** You can specify both `ids` as well as `titles` when using this routine. Please be aware that the `matchAll` parameter set to `true` will match all tags specified by id or title separately but not collectively. # Category Object From 930272da853654ac29e9b46415a8be0cb9e12178 Mon Sep 17 00:00:00 2001 From: thex Date: Thu, 28 Nov 2019 14:43:09 +0100 Subject: [PATCH 3/3] finder tags doc, fixed missing blank --- pages/01.gantry5/05.advanced/10.content-in-particles/docs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md b/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md index bc183bc..4705ae4 100644 --- a/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md +++ b/pages/01.gantry5/05.advanced/10.content-in-particles/docs.md @@ -172,7 +172,7 @@ Operation is one of: `>`, `>=`, `<`, `<=`, `=`, `BETWEEN`, `NOT BETWEEN`, `IN` a * `tags` Object that can contain tag `ids` as well as tag `titles` * `ids` Either array of tag ids or single id - * `titles`Either array of tag titles or a single title + * `titles` Either array of tag titles or a single title * `matchAll` Set *True* if you want to match an article against all specified tags, *false* if you want to match an article against any passed tag ```twig