Skip to content

Commit e029ddc

Browse files
authored
Merge pull request #863 from ExpressionEngine/feature/ttt-math-in-conditionals
TTT Using Mathematic Operators in Conditionals
2 parents 71498e1 + b1837b3 commit e029ddc

File tree

8 files changed

+21
-16
lines changed

8 files changed

+21
-16
lines changed

docs/add-ons/pro-search/development/anatomy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ An array of entry IDs, an empty array (no results), or `NULL` (if given and your
6969

7070
### fixed_order
7171

72-
Should return `TRUE` or `FALSE` depending on whether the entry IDs returned by [the filter method](#filter-method) are in the order they should appear in the [Results tag](/add-ons/pro-search/tags.md#results-tag). Defaults to `FALSE`.
72+
Should return `TRUE` or `FALSE` depending on whether the entry IDs returned by [the filter method](#filter) are in the order they should appear in the [Results tag](/add-ons/pro-search/tags.md#exppro_searchresults). Defaults to `FALSE`.
7373

7474
#### Returns
7575

@@ -85,7 +85,7 @@ Should return an array of entry IDs that should be _excluded_ from the search re
8585

8686
### results
8787

88-
This method is called before displaying the search results in the [Results tag](/add-ons/pro-search/tags.md#results-tag) so you can add your own custom variables to the search results. It basically piggy-backs on the [channel_entries_query_result](/development/extension_hooks/module/channel/index.md#channel-entries-query-result) extension hook.
88+
This method is called before displaying the search results in the [Results tag](/add-ons/pro-search/tags.md#exppro_searchresults) so you can add your own custom variables to the search results. It basically piggy-backs on the [channel_entries_query_result](/development/extension-hooks/module/channel.md#channel_entries_query_resultthis-query_result) extension hook.
8989

9090
#### Arguments
9191

docs/add-ons/pro-search/development/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Checks if given value is present in given parameter.
9797

9898
### prep
9999

100-
Modifies a parameter value to EE syntax based on the presence of the parameter name in other parameters like [require_all](./parameters#inclusive-values) or [exclude](./parameters#exclude-values).
100+
Modifies a parameter value to EE syntax based on the presence of the parameter name in other parameters like [require_all](/add-ons/pro-search/parameters.md#inclusive-values) or [exclude](/add-ons/pro-search/parameters.md#exclude-values).
101101

102102
#### Arguments
103103

docs/add-ons/pro-search/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
-->
99
# Examples
1010

11-
Have you read the docs on [Parameters](/add-ons/pro-search/parameter.md)? Good. Are you familiar with the custom [Filters](/add-ons/pro-search/filters.md)? Excellent. Taken a look at the [Template Tags](/add-ons/pro-search/tags.md)? Perfect. Then here are some examples that illustrate how these three are combined.
11+
Have you read the docs on [Parameters](/add-ons/pro-search/parameters.md)? Good. Are you familiar with the custom [Filters](/add-ons/pro-search/filters.md)? Excellent. Taken a look at the [Template Tags](/add-ons/pro-search/tags.md)? Perfect. Then here are some examples that illustrate how these three are combined.
1212

1313
[TOC]
1414

@@ -503,7 +503,7 @@ Below are two lists of tags. You can select multiple tags per list. Entries that
503503

504504
## Other & Native
505505

506-
In addition to what all the [filters](/add-ons/pro-search/filters.md) bring to the party, you can also filter by native ExpressionEngine parameters, as well as some [little extras](/add-ons/pro-search/tags.md/results-tag).
506+
In addition to what all the [filters](/add-ons/pro-search/filters.md) bring to the party, you can also filter by native ExpressionEngine parameters, as well as some [little extras](/add-ons/pro-search/tags.md#results-tag).
507507

508508
### Orderby and sort in one go
509509

docs/add-ons/pro-search/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Apart from the powerful [keywords filter](/add-ons/pro-search/filters.md#keyword
2626

2727
Other features include:
2828

29-
- Keyword [suggestions](/add-ons/pro-search/tags.md#suggestions-tag) based on your own [lexicon](/add-ons/pro-search/lexicon.md);
30-
- Fuzzy searches using [singulars & plurals](/add-ons/pro-search/filters.md#keywords-inflect) or [word stems](/add-ons/pro-search/filters.md#keywords-stem);
31-
- [Diacritic insensitive](/add-ons/pro-search/collections.md#diacritics) keyword searches;
29+
- Keyword [suggestions](/add-ons/pro-search/tags.md#exppro_searchsuggestions) based on your own [lexicon](/add-ons/pro-search/lexicon.md);
30+
- Fuzzy searches using [singulars & plurals](/add-ons/pro-search/filters.md#keywordsinflect) or [word stems](/add-ons/pro-search/filters.md#keywordsstem);
31+
- [Diacritic insensitive](/add-ons/pro-search/collections.md#diacritics-and-foreign-characters) keyword searches;
3232
- Multiple site search;
3333
- Search [shortcuts](/add-ons/pro-search/shortcuts.md) for custom search queries and URLs;
3434
- An exportable search log;
35-
- A super powerful [Find & Replace utility](/add-ons/pro-search/find-replace.md);
36-
- A [custom filter API](/add-ons/pro-search/development/create.md), [fieldtype API](/add-ons/pro-search/development/api.md), and [extension hooks](/add-ons/pro-search/development/hooks.md) for developers.
35+
- A super powerful [Find & Replace utility](/add-ons/pro-search/find-and-replace.md);
36+
- A [custom filter API](/add-ons/pro-search/development/create.md), [fieldtype API](/add-ons/pro-search/development/api.md), and [extension hooks](/add-ons/pro-search/development/hooks.md) for developers.

docs/add-ons/pro-search/tags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Name of the shortcut to use for the search query
9191

9292
#### {pro_search_*query_parameter*}
9393

94-
To output the value of an existing [query parameter](parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`.
94+
To output the value of an existing [query parameter](/add-ons/pro-search/parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`.
9595

9696
#### {collections}{/collections}
9797

@@ -273,7 +273,7 @@ Name of the shortcut to use for the search query.
273273

274274
#### {pro_search_*query_parameter*}
275275

276-
To output the value of an existing [query parameter](parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`.
276+
To output the value of an existing [query parameter](/add-ons/pro-search/parameters.md) such as "keywords" or "item:size", use `{pro_search_}` and append the parameter name e.g. `{pro_search_item:size}`.
277277

278278
NOTE: **Note:** This is not used to output the content from a matching result. It outputs the value of an existing search parameter i.e. *Your search for "cowboy hats" in size "Large" returned 19 results.*
279279

docs/add-ons/pro-variables/tags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Total of iterations of the loop.
6868

6969
If you’re displaying a 3rd party field type, you can use all variables you would normally use inside the field channel variable pair.
7070

71-
NOTE: **Note:** the `{_my_var_:…}` variables are _only_ available when using the Parse tag pair or Pair tag pair, _and_ if the variable type allows multiple items to be selected. For more options on the native variable types, [check their properties](/add-ons/pro-variables/types.md).
71+
NOTE: **Note:** the `{_my_var_:…}` variables are _only_ available when using the Parse tag pair or Pair tag pair, _and_ if the variable type allows multiple items to be selected. For more options on the native variable types, [check their properties](/add-ons/pro-variables/type.md).
7272

7373
{exp:pro_variables:parse var="my_site:my_var"}
7474

docs/add-ons/pro-variables/type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Uses the native [File field](/fieldtypes/file.md). To output the variable, alway
5656

5757
#### `modifier`
5858

59-
Allows applying modifiers, which, among other, are used to apply [on-the-fly image manipulations](/fieldtypes/grid.md#on-the-fly-image-manipulations) to files
59+
Allows applying modifiers, which, among other, are used to apply [on-the-fly image manipulations](/fieldtypes/file.md#on-the-fly-image-manipulations) to files
6060

6161
## Grid
6262

63-
Uses the native [Grid field](/fieldtypes/grid.md). All native types are available, _except for Relationships and Members_. To output the variable, use the `{exp:pro_variables:pair}` or `{exp:pro_variables:single}` tag where appropriate. You can use any of Grid’s [parameters](/fieldtypes/grid.md#parameters) and [variables](/fieldtypes/grid.ms#variables) using these tags. Additionally, one more parameter is available:
63+
Uses the native [Grid field](/fieldtypes/grid.md). All native types are available, _except for Relationships and Members_. To output the variable, use the `{exp:pro_variables:pair}` or `{exp:pro_variables:single}` tag where appropriate. You can use any of Grid’s [parameters](/fieldtypes/grid.md#parameters) and [variables](/fieldtypes/grid.md#variables) using these tags. Additionally, one more parameter is available:
6464

6565
### Parameters
6666

@@ -355,7 +355,7 @@ To be used in combination with `format`. Possible values: `none`, `safe` or `all
355355

356356
#### `preparse:_my_var_`
357357

358-
If the variable content contains variables that need to be parsed before it is put in the template, you can use this parameter, similar to [embed variables](/templates/embedding.md#embed-variables-for-the-embedded-template). For example: setting the parameter `preparse:foo="bar"` will replace the variable `{preparse:foo}` with `bar` in the variable content.
358+
If the variable content contains variables that need to be parsed before it is put in the template, you can use this parameter, similar to [embed variables](/templates/embedding.md#embedding-variables). For example: setting the parameter `preparse:foo="bar"` will replace the variable `{preparse:foo}` with `bar` in the variable content.
359359

360360
#### `preparse_prefix`
361361

docs/templates/conditionals.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,11 @@ The NOT operator (`!`) also can be used at the beginning of the statement to neg
160160

161161
### Mathematic Operators
162162

163+
Tip: Using Mathematic Operators in Conditionals
164+
<div class="video-wrapper">
165+
<iframe src="https://www.youtube.com/embed/xNWCiKNNL_w" width="1920" height="1080" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
166+
</div>
167+
163168
You can use the following mathematical operators to compute values:
164169

165170
| Operator | Name |

0 commit comments

Comments
 (0)