You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @description Get all entries for a specific taxonomy that match only the parent term(s) of a specified target term, excluding the target term itself. You can also specify a specific level.
28
+
* @param {String} key - uid of the taxonomy, specified as `taxonomies.<taxonomy_uid>`
29
+
* @param {*} value - uid of the term to be matched
30
+
* @example For taxonomy_uid = taxonomy1, and term_uid = term1
31
+
* let blogQuery = Stack().ContentType('example').Query();
32
+
* let data = blogQuery.above("taxonomies.taxonomy1", "term1").toJSON().find() // without levels
33
+
* let data = blogQuery.above("taxonomies.taxonomy1", "term1", 4).toJSON().find() // with levels
34
+
* data.then(function (result) {
35
+
* // result = the data which matches only the parent term(s) of the specified term, excluding the term itself
36
+
* },function (error) {
37
+
* // error function
38
+
* })
39
+
* @returns {Query}
40
+
* @instance
41
+
*/
24
42
this.above=_extend.compare('$above')
43
+
44
+
/**
45
+
* @method equalAndAbove
46
+
* @memberOf Query
47
+
* @description Get all entries for a specific taxonomy that match a specific term and all its ancestor terms, requiring only the target term and a specified level.
48
+
* @param {String} key - uid of the taxonomy, specified as `taxonomies.<taxonomy_uid>`
49
+
* @param {*} value - uid of the term to be matched
50
+
* @example For taxonomy_uid = taxonomy1, and term_uid = term1
51
+
* let blogQuery = Stack().ContentType('example').Query();
52
+
* let data = blogQuery.equalAndAbove("taxonomies.taxonomy1", "term1").toJSON().find() // without levels
53
+
* let data = blogQuery.equalAndAbove("taxonomies.taxonomy1", "term1", 4).toJSON().find() // with levels
54
+
* data.then(function (result) {
55
+
* // result = the data which matches a specific term and all its ancestor terms
56
+
* },function (error) {
57
+
* // error function
58
+
* })
59
+
* @returns {Query}
60
+
* @instance
61
+
*/
25
62
this.equalAndAbove=_extend.compare('$eq_above')
63
+
64
+
/**
65
+
* @method below
66
+
* @memberOf Query
67
+
* @description Get all entries for a specific taxonomy that match all of their descendant terms by specifying only the target term and a specific level.
68
+
* @param {String} key - uid of the taxonomy, specified as `taxonomies.<taxonomy_uid>`
69
+
* @param {*} value - uid of the term to be matched
70
+
* @example For taxonomy_uid = taxonomy1, and term_uid = term1
71
+
* let blogQuery = Stack().ContentType('example').Query();
72
+
* let data = blogQuery.below("taxonomies.taxonomy1", "term1").toJSON().find() // without levels
73
+
* let data = blogQuery.below("taxonomies.taxonomy1", "term1", 4).toJSON().find() // with levels
74
+
* data.then(function (result) {
75
+
* // result = the data which matches all of the descendant terms.
76
+
* },function (error) {
77
+
* // error function
78
+
* })
79
+
* @returns {Query}
80
+
* @instance
81
+
*/
26
82
this.below=_extend.compare('$below')
83
+
84
+
/**
85
+
* @method equalAndBelow
86
+
* @memberOf Query
87
+
* @description Get all entries for a specific taxonomy that match a specific term and all its descendant terms, requiring only the target term and a specified level.
88
+
* @param {String} key - uid of the taxonomy, specified as `taxonomies.<taxonomy_uid>`
89
+
* @param {*} value - uid of the term to be matched
90
+
* @example For taxonomy_uid = taxonomy1, and term_uid = term1
91
+
* let blogQuery = Stack().ContentType('example').Query();
92
+
* let data = blogQuery.equalAndBelow("taxonomies.taxonomy1", "term1").toJSON().find() // without levels
93
+
* let data = blogQuery.equalAndBelow("taxonomies.taxonomy1", "term1", 4).toJSON().find() // with levels
94
+
* data.then(function (result) {
95
+
* // result = the data which matches a specific term and all its descendant terms.
0 commit comments