Package DE_EPAGES::Content::API::ShortUrl
API functions for content objects
@EXPORT_OK |
Functions
CreateAllShortUrls
Creates the short urls for all content objects in the shop.
Syntax |
CreateAllShortUrls($Shop); |
Input |
|
GenerateShortUrl
Converts a string to a valid short url.
Syntax |
$URI = GenerateShortUrl($Shop, $Name, $LanguageID); $URI = GenerateShortUrl($Shop, $Name, $LanguageID, $ahTemporaryReserved); |
Input |
|
Return |
|
GetObjectByURI
Returns the content object of a shop for the given short url. Returns ($Shop->get('Categories'), $URI) if $URI is a valid locale id. Returns an empty array if the uri does not exist in the shop.
Syntax |
($ContentObject, LocaleID) = GetObjectByURI($Shop, $URI); |
Example |
($ContentObject, LocaleID) = GetObjectByURI($Shop, 'futter/hundekuchen'); ($ContentObject, LocaleID) = GetObjectByURI($Shop, 'de_DE'); |
Input |
|
Return |
|
GetShortUrlByClass
Returns a suggestion for a short url dependend from content object.
Syntax |
$URI = GetShortUrlByClass($Parent, $Class, $Name, $LanguageID); $URI = GetShortUrlByClass($Parent, $Class, $Name, $LanguageID, $ahTemporaryReserved); |
Input |
|
Return |
|
TestShortUrl
Throws an error if short url is not valid: - max 255 characters - only a-zA-Z0-9-/ - unique
Syntax |
TestShortUrl($Shop, $ContentObject, $URI, $LanguageID); |
Input |
|