Url helper
: shell
: content
: url-helper
: /modules/core/content/services/url-helper.js
: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/content/services/url-helper.js
UrlHelper
Kind: global class
- UrlHelper
- new UrlHelper()
- .getUrl(id) ⇒
string - .getId(url) ⇒
string
new UrlHelper()
Utilities to manipulate content item URLs.
urlHelper.getUrl(id) ⇒ string
Gets the URL for a content item by asking all middleware.
Kind: instance method of UrlHelper
Returns: string - The URL for the content item.
| Param | Type | Description |
|---|---|---|
| id | string |
The id of the content item. |
urlHelper.getId(url) ⇒ string
Gets the content item ID for a URL, if the URL corresponds to a content-item, by asking all middleware.
Kind: instance method of UrlHelper
Returns: string - The content item ID for the URL, or null if none was found.
| Param | Type | Description |
|---|---|---|
| url | string |
The URL to resolve. |