From b1837b3912cc702d15265dd38e8da6649f6c2688 Mon Sep 17 00:00:00 2001 From: robinsowell Date: Tue, 11 Jun 2024 17:07:22 -0400 Subject: [PATCH] TTT Using Mathematic Operators in Conditionals And fixed some bad links. --- docs/add-ons/pro-search/development/anatomy.md | 4 ++-- docs/add-ons/pro-search/development/functions.md | 2 +- docs/add-ons/pro-search/examples.md | 4 ++-- docs/add-ons/pro-search/overview.md | 10 +++++----- docs/add-ons/pro-search/tags.md | 4 ++-- docs/add-ons/pro-variables/tags.md | 2 +- docs/add-ons/pro-variables/type.md | 6 +++--- docs/templates/conditionals.md | 5 +++++ 8 files changed, 21 insertions(+), 16 deletions(-) diff --git a/docs/add-ons/pro-search/development/anatomy.md b/docs/add-ons/pro-search/development/anatomy.md index a6d25f405..1b2096a7a 100644 --- a/docs/add-ons/pro-search/development/anatomy.md +++ b/docs/add-ons/pro-search/development/anatomy.md @@ -69,7 +69,7 @@ An array of entry IDs, an empty array (no results), or `NULL` (if given and your ### fixed_order -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`. +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`. #### Returns @@ -85,7 +85,7 @@ Should return an array of entry IDs that should be _excluded_ from the search re ### results -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. +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. #### Arguments diff --git a/docs/add-ons/pro-search/development/functions.md b/docs/add-ons/pro-search/development/functions.md index 7676a1010..9736b3783 100644 --- a/docs/add-ons/pro-search/development/functions.md +++ b/docs/add-ons/pro-search/development/functions.md @@ -97,7 +97,7 @@ Checks if given value is present in given parameter. ### prep -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). +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). #### Arguments diff --git a/docs/add-ons/pro-search/examples.md b/docs/add-ons/pro-search/examples.md index 4c1923eb8..330935542 100644 --- a/docs/add-ons/pro-search/examples.md +++ b/docs/add-ons/pro-search/examples.md @@ -8,7 +8,7 @@ --> # Examples -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. +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. [TOC] @@ -503,7 +503,7 @@ Below are two lists of tags. You can select multiple tags per list. Entries that ## Other & Native -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). +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). ### Orderby and sort in one go diff --git a/docs/add-ons/pro-search/overview.md b/docs/add-ons/pro-search/overview.md index 36218c108..1990ccac2 100644 --- a/docs/add-ons/pro-search/overview.md +++ b/docs/add-ons/pro-search/overview.md @@ -26,11 +26,11 @@ Apart from the powerful [keywords filter](/add-ons/pro-search/filters.md#keyword Other features include: -- Keyword [suggestions](/add-ons/pro-search/tags.md#suggestions-tag) based on your own [lexicon](/add-ons/pro-search/lexicon.md); -- Fuzzy searches using [singulars & plurals](/add-ons/pro-search/filters.md#keywords-inflect) or [word stems](/add-ons/pro-search/filters.md#keywords-stem); -- [Diacritic insensitive](/add-ons/pro-search/collections.md#diacritics) keyword searches; +- Keyword [suggestions](/add-ons/pro-search/tags.md#exppro_searchsuggestions) based on your own [lexicon](/add-ons/pro-search/lexicon.md); +- Fuzzy searches using [singulars & plurals](/add-ons/pro-search/filters.md#keywordsinflect) or [word stems](/add-ons/pro-search/filters.md#keywordsstem); +- [Diacritic insensitive](/add-ons/pro-search/collections.md#diacritics-and-foreign-characters) keyword searches; - Multiple site search; - Search [shortcuts](/add-ons/pro-search/shortcuts.md) for custom search queries and URLs; - An exportable search log; -- A super powerful [Find & Replace utility](/add-ons/pro-search/find-replace.md); -- 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. \ No newline at end of file +- A super powerful [Find & Replace utility](/add-ons/pro-search/find-and-replace.md); +- 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. diff --git a/docs/add-ons/pro-search/tags.md b/docs/add-ons/pro-search/tags.md index ef9aaef64..d77a64782 100644 --- a/docs/add-ons/pro-search/tags.md +++ b/docs/add-ons/pro-search/tags.md @@ -91,7 +91,7 @@ Name of the shortcut to use for the search query #### {pro_search_*query_parameter*} -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}`. +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}`. #### {collections}{/collections} @@ -273,7 +273,7 @@ Name of the shortcut to use for the search query. #### {pro_search_*query_parameter*} -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}`. +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}`. 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.* diff --git a/docs/add-ons/pro-variables/tags.md b/docs/add-ons/pro-variables/tags.md index 50a284829..d1c45c2bb 100644 --- a/docs/add-ons/pro-variables/tags.md +++ b/docs/add-ons/pro-variables/tags.md @@ -68,7 +68,7 @@ Total of iterations of the loop. If you’re displaying a 3rd party field type, you can use all variables you would normally use inside the field channel variable pair. -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). +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). {exp:pro_variables:parse var="my_site:my_var"} diff --git a/docs/add-ons/pro-variables/type.md b/docs/add-ons/pro-variables/type.md index 5b90c3af4..438b193b8 100644 --- a/docs/add-ons/pro-variables/type.md +++ b/docs/add-ons/pro-variables/type.md @@ -56,11 +56,11 @@ Uses the native [File field](/fieldtypes/file.md). To output the variable, alway #### `modifier` -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 +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 ## Grid -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: +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: ### Parameters @@ -355,7 +355,7 @@ To be used in combination with `format`. Possible values: `none`, `safe` or `all #### `preparse:_my_var_` -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. +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. #### `preparse_prefix` diff --git a/docs/templates/conditionals.md b/docs/templates/conditionals.md index a28ccc1af..d785ca282 100755 --- a/docs/templates/conditionals.md +++ b/docs/templates/conditionals.md @@ -160,6 +160,11 @@ The NOT operator (`!`) also can be used at the beginning of the statement to neg ### Mathematic Operators +Tip: Using Mathematic Operators in Conditionals +
+ +
+ You can use the following mathematical operators to compute values: | Operator | Name |