Skip to content
Stef Heyenrath edited this page Apr 18, 2020 · 2 revisions

Custom Url Helpers

These helpers provide some ability to manage strings for use within a url.


Url.DecodeUri

Summary Decode a uri encoded string
Returns decoded string
Remarks
Parameters
str Uri encoded string

Example

Context

{
    "value": "arinet%2FHandlebarDocs%2Fblob%2Fmaster%2FcustomHelpers%2Furl.md%23decodeuri"
}

Usage

<strong>result:</strong>
{{Url.DecodeUri value}}
{{Url.DecodeUri "%2Fsearch%2Finventory%2Fbrand%2FPolaris+Industries%2Fsort%2Fbest-match"}}

Returns

<strong>result:</strong>
arinet/HandlebarDocs/blob/master/customHelpers/url.md#decodeuri
/search/inventory/brand/Polaris Industries/sort/best-match

Url.EncodeUri

Summary Uri encode a string
Returns Uri encoded string
Remarks
Parameters
str String to encode

Example

Context

{
    "value": "arinet/HandlebarDocs/blob/master/customHelpers/url.md#encodeuri"
}

Usage

<strong>result:</strong>
{{Url.EncodeUri value}}
{{Url.EncodeUri "/search/inventory/brand/Polaris Industries/sort/best-match"}}

Returns

<strong>result:</strong>
arinet%2FHandlebarDocs%2Fblob%2Fmaster%2FcustomHelpers%2Furl.md%23encodeuri
%2Fsearch%2Finventory%2Fbrand%2FPolaris+Industries%2Fsort%2Fbest-match
Clone this wiki locally