| Encoding | Value |
|---|---|
| Original | https://jsmith:[email protected]:443/path/to some/file.html?q=s&q2=a+b&q3=some thing#hash=value |
| &mvte | https://jsmith:[email protected]:443/path/to some/file.html?q=s&q2=a+b&q3=some thing#hash=value |
| encodeURI() | https://jsmith:[email protected]:443/path/to%20some/file.html?q=s&q2=a+b&q3=some%20thing#hash=value |
| &mvta | https%3A%2F%2Fjsmith%[email protected]%3A443%2Fpath%2Fto+some%2Ffile.html%3Fq%3Ds%26q2%3Da%2Bb%26q3%3Dsome+thing%23hash%3Dvalue |
| encodeURIComponent() | https%3A%2F%2Fjsmith%3Afoo%40www.example.com%3A443%2Fpath%2Fto%20some%2Ffile.html%3Fq%3Ds%26q2%3Da%2Bb%26q3%3Dsome%20thing%23hash%3Dvalue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| Parameters | |
| </mvt:comment> | |
| <mvt:assign name="l.combofacet_field_code" value="'ymm'" /> | |
| <mvt:assign name="l.combofacet_product_value" value="'1967>Ford>Mustang|1967>Chevy>Camaro'" /> | |
| <mvt:assign name="l.product_code" value="'fitment-test'" /> | |
| <mvt:comment> | |
| Loading the Data and Module Settings | |
| </mvt:comment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment>One-Time Setup</mvt:comment> | |
| <mvt:do file="g.Module_Library_DB" name="l.module_loaded" value="Module_Load_Code_Cached('tg_transients', l.tg_transients_module)" /> | |
| <mvt:do file="g.Module_Library_DB" name="l.storemodule_installed" value="StoreModule_Load_Cached(l.tg_transients_module:id, 'util', l.null)" /> | |
| <mvt:if expr="l.tg_transients_module:active AND l.storemodule_installed"> | |
| <mvt:assign name="g.Module_TG_Transients" value="g.Module_Root $ l.tg_transients_module:module" /> | |
| <mvt:else> | |
| <mvt:assign name="g.Module_TG_Transients" value="''" /> | |
| </mvt:if> | |
| <mvt:comment>Each Usage</mvt:comment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:assign name="l.data_for_api:thing_1" value="'Foobar'" /> | |
| <mvt:assign name="l.data_for_api:thing_2" value="'Lorem ipsum...'" /> | |
| <mvt:capture variable="l.json_string"> | |
| <mvt:do file="g.Module_JSON" name="l.success" value="JSON_Output( l.data_for_api )" /> | |
| </mvt:capture> | |
| <mvt:call action="'https://ssoule.mivamerchantdev.com/php/mvt-call-converter.php'" method="'GET'" fields="'json_string'"> | |
| <mvt:eval expr="s.callvalue" /> | |
| </mvt:call> |
MivaScript 5.36 added support for s.null. s.null will always be null. Assigning a value to s.null does not change the value of s.null and avoids keeping the result of a function or expression in memory.
You can assign variables to s.null when you do not need to use the return variable for anything. By assigning variables to s.null, it more clearly indicates that the variable will not be used (as opposed to l.result or l.success). Just be sure you do not pass s.null (or variables assign to s.null by reference) into MivaScript or mvt:do functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:capture variable="l.xml:string"> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <codes> | |
| <code>ABC-123-DEF-456</code> | |
| <code>XYZ-987-TUV-000</code> | |
| </codes> | |
| </mvt:capture> | |
| <mvt:assign name="l.xml:xml_parse_var_result" value="xml_parse_var( l.xml:string, l.xml:var )" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://materialui.co/colors/ | |
| // https://github.com/shuhei/material-colors/blob/master/dist/colors.json | |
| const colors = { | |
| "red": { | |
| "50": "#ffebee", | |
| "100": "#ffcdd2", | |
| "200": "#ef9a9a", | |
| "300": "#e57373", | |
| "400": "#ef5350", | |
| "500": "#f44336", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <mvt:comment> | |
| Loop over the mvt:call response headers | |
| </mvt:comment> | |
| <mvt:call action="'https://ssoule.mivamerchantdev.com/robots.txt'" method="'GET'"> | |
| <mvt:assign name="l.settings:headers" value="s.callreturnheader" /> | |
| </mvt:call> | |
| <mvt:foreach iterator="header" array="headers"> | |
| <mvt:if expr="'Set-Cookie' CIN l.settings:header"> | |
| &mvt:header; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://formulae.brew.sh/formula/duti | |
| brew install duti | |
| # Use duti to set defaults for specific files to VSCode | |
| duti -s com.microsoft.VSCode public.plain-text all | |
| duti -s com.microsoft.VSCode public.source-code all | |
| duti -s com.microsoft.VSCode public.data all | |
| duti -s com.microsoft.VSCode .css all | |
| duti -s com.microsoft.VSCode .gitattributes all | |
| duti -s com.microsoft.VSCode .gitignore all |