Pixelsilk API function to return what a section's url would be with different settings on URL tab in admin--requires the edit-page-properties permission
Urls have the following modes: PathSlash, PathName, PathNameExtension, PathSlashFile, and Rewrite.

sectionId: the unique identifier of the section (page)
urlMode: the url mode (see above)
pathName: the name of the section (based on the urlMode) without the rest of the path
extension: the extension, if there is to be one
rewriteUrl: the url to rewrite to, if that is the mode
toLowerCase: true = url in lower case; false = url not in lower case
useParentSettings: true = use parent settings; false = don't use parent settings

The function getPotentialUrl returns the url in string format

C# Example:
Guid sectionId = <section's id>;
string urlMode = "selectedMode";
string pathName = "nameOfSection";
string extension = "extensionStr";
string rewriteUrl = "urlToRewriteTo";
bool toLowerCase = false;
bool useParentSettings = true;
string potentialUrl = GetPotentialUrl(sectionId, urlMode, pathName, extension, rewriteUrl, toLowerCase, useParentSettings);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/getPotentialUrl HTTP/1.1
Content-Length: 389
Content-Type: application/x-www-form-urlencoded
Cookie: auth=0605CC2EF64A...7761940EEC1D

Request Data:
Unencoded Data:

Url-encoded Data:

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=4C7672E1A0C6...8635D38D0B2; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 49

Response Data:

JavaScript Example:
Method Call:
pixelsilk2.getPotentialUrl(input, callback);

Input Object:

Returned Data:

Back to Pages »