Nucleus .Net Core CMS

Models.LocalPath Class

Namespace: Nucleus.Abstractions.Models
Assembly: Nucleus.Abstractions.dll
Provides an object representation of a the part of the request path that was not resolved to a page, and easy access to the parts of the path.


Nucleus extensions do not create this object directly. Use the Context. LocalPath property to get a LocalPath instance.


if (this.Context.LocalPath.Segments.Length == 1 && Guid.TryParse(this.Context.LocalPath.Segments.First(), out Guid productId)) 
  // if id is specified in the url, and is a guid, load content by id 
  // ... 


Nucleus.Abstractions.Models.LocalPath Constructor

Nucleus.Abstractions.Models.LocalPath (String path)
Initializes a new instance of the LocalPath class.
Name Type
path String
Nucleus extensions do not use this contructor. The LocalPath property of the Models.Context class provides access to the local path.


HasValue Property

Returns whether this LocalPath instance has a value.

FullPath Property

Return the local path

Path Property

Gets the local path part of the specified absolute path (the part that does not contain the query)

Segments Property

Gets an array containing the path segments that make up the local path.



ToString ()
Gets a string representation for the specified Uri path (returns AbsolutePath).