Class Path
- Namespace
- Dynamicweb.Frontend.Direct
Path
- Assembly
- Dynamicweb.dll
Defines a virtual path mapping. I.e. /Contact -> /Default.aspx?ID=123
- Inheritance
-
Path
- Inherited Members
Constructors
Path()
Initializes a new instance of the Path class.
Properties
Active
Gets or sets a value indicating whether this Path is active.
Property Value
- bool
true
if active; otherwise,false
.
AreaID
Gets or sets an ID of the language are that this path is defined for.
Property Value
Created
Gets or sets the created time.
Property Value
- Date
Time The created time.
ID
Gets or sets the ID.
Property Value
- int
The ID.
Redirect
Gets or sets the redirect. I.e. Default.aspx?ID=123
Property Value
- string
The redirect.
Updated
Gets or sets the updated time.
Property Value
- Date
Time The updated time.
VisitsCount
Returnt count of visits of curernt path
Property Value
- int
Integer count of path visits
Methods
Delete()
Deletes this instance.
Delete(int)
Deletes the path with the specified id.
Parameters
id
intThe id.
Delete(int[])
Deletes items specified by array of their IDs.
Parameters
ids
int[]Item IDs to delete.
GetAllPaths()
Gets all paths.
Returns
GetPathById(int)
Gets the path by ID.
Parameters
id
intThe path ID.
Returns
GetPathByUrl(string)
Gets the path by URL.
Parameters
urlPath
stringThe URL path.
Returns
GetPathsByArea(int)
Retrieves top 1000 paths defined for a given area.
Parameters
areaID
intAn ID of the area to filter results by.
Returns
- IEnumerable<Path>
Matched items or empty collection if nothing found.
GetPathsByPage(int)
Gets the paths by page.
Parameters
pageId
intThe page ID.
Returns
GetPathsByPageIds(int[])
Gets the paths by page ids.
Parameters
pageIds
int[]The page IDs.
Returns
- Dictionary<int, List<Path>>
GetPathsByPath()
Gets all paths ordered by the path.
Returns
GetPathsByPath(SortBy, SortDirection)
Retrieves top 1000 paths.
Parameters
sortBy
SortBy The field to sort items by.
sortDirection
SortDirection Direction of sorting.
Returns
- IEnumerable<Path>
Top 1000 paths.
GetPathsByUrl(string)
Gets the paths by URL.
Parameters
urlPath
stringThe URL path.
Returns
IncrementVisitsCount()
Increments visit counts of path by 1
Remarks
If field value is NULL it will be set to 1
PathExists(string)
Gets a value indicating whether path exists in database.
Parameters
path
stringThe path.
Returns
PhysicallyExists(string)
Gets a value indicating whether path physically exists.
Parameters
path
stringThe path
Returns
- bool
true
if path physically exists; otherwise,false
.
Remarks
Checks if the path exists on the file system
Save()
Saves this instance.
SetActiveState(int, bool)
Sets the active state of the instance.
Parameters
SetActiveState(int[], bool)
Switches items specified by array of their IDs active/inactive state.