VERSION 10.0 is compiled for Sitecore 10.0 use and will not work on earlier versions.
Requires Sitecore 10.0
Requires .NET 4.8

Constellation is a collection of utilities for .NET CMS implementers.
The Foundation.Data namespace contains an Item extension class that allows the developer to:
- Get an Item's ancestor based on Template
- Test an Item's Template inheritance
- Retrieve an Item's children based on a specific Template
- Retrieve the URL for the Item using the currently active LinkManager configuration.
- Determine if the Item is in the Context Site.
- Find or create an Item's child given a name and a Template ID.

Install-Package Constellation.Foundation.Data -Version
dotnet add package Constellation.Foundation.Data --version
<PackageReference Include="Constellation.Foundation.Data" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Constellation.Foundation.Data --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Constellation.Foundation.Data,"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

Release Notes

Fixed an issue where the Item.GetUrl() method would not take into account the Context LinkManager settings.

NuGet packages (11)

Showing the top 5 NuGet packages that depend on Constellation.Foundation.Data:

Package Downloads
VERSION 10.0 is compiled for Sitecore 10.0 use and will not work on earlier versions. Requires Sitecore 10.0 Requires .NET 4.8 Constellation is a collection of utilities for .NET CMS implementers. The Foundation.ModelMapping library is inspired by AutoMapper and is designed to provide a quick, non-ORM method of mapping Sitecore Items to ViewModels. String properties on your ViewModel will be mapped to FieldRendered values from fields with the same names. Integer and DateTime property types can also be handled automatically, although you will not get page editor support for these types. There are a number of Attributes that you can assign to your ViewModel's properties to change the behavior of the Mapper. Usage: var modelMapper = (IModelMapper)ServiceLocator.ServiceProvider.GetService(typeof(IModelMapper)); // Dependency Injection of an IModelMapper is supported TModel viewModel = modelMapper.MapItemToNew<TModel>(sourceItem); Or: TModel viewmodel = item.MapToNew<TModel>(); Or: modelMapper.MapTo(item, model); When using Item or ItemList extensions for mapping, the context IModelMapper is requested from the ServiceLocator, so any moc objects you use for testing are supported with these extension methods. Constraints: - Your ViewModel must have a public, parameterless constructor. - Only Writable, Public Instance properties will be mapped. - Within Sitecore, your field names can be human-legible. ModelMapper will attempt to convert the field name to a valid Property name. Simpler names work best. You can use the Field's Display Name for better human legibility and keep the Field's actual name closer to a legit C# entity name. - ViewModel properties can be: - - Strings - - HtmlStrings (recommended for RichText and FieldRenderer) - - Integers - - Decimals - - DateTimes - - Other ViewModels (recommended for DropLink, DropTree) - - ICollection Generics of other ViewModels (recommended for Multilist, Treelist) - - ModelMapping.Model.ImageModel (for Image Fields, gives access to all field properties and permits generating different kinds of image URLs on the View.) - - ModelMapping.Model.GeneralLinkModel (for General Link fields, gives access to all field properties through a single object.) - - Random Plain Old Classes as long as they are Where T: class, new() The following Model properties are mapped to Item properties rather than Item fields: - ID - Maps to the Item.ID - Make sure you use Sitecore.Data.ID as the property type. - Name - Maps to the Item.Name - DisplayName - Maps to Item.DisplayName - Url - Should be a string, not a Uri. Causes the current context LinkManager to generate a Url for the Item. - Parent - Maps to the ViewModel you provide based on the Item.Parent. Support for XML Field Attributes - ImageField.Alt - use Model.FieldNameAlt - ImageField.Height - use Model.FieldNameHeight - GeneralLink.Target - use Model.FieldNameTarget - etc. Support for LinkField.TargetItem - use Model.FieldNameTargetItem and supply a class with public properties and a parameterless constructor. Support for MultilistField.GetItems - use Model.FieldName and supply a generic ICollection<T> where "T" is new() and has properties you can map. Extensible! See the Constellation.Foundation.ModelMapping.config file to change the way Fields are processed.
Compatible with Sitecore 10.0 Requires Sitecore 10.0 Requires .NET Framework 4.8 Constellation is a collection of utilities for .NET CMS implementers. The Feature.Navigation library addresses the three most common forms of Navigation on Sitecore sites: Declared (static) Navigation: (explicitly defined, may differ from the shape of the content tree) - DeclaredNavigationRepository.GetNavigation - Accepts a Navigation Menu item and assembles a full tree-like ViewModel for immediate processing in your View. If you need context highlighting in your navigation, be sure to pass in the Context Item as well. When using NavigationLink objects, there are usually several opportunities to supply the text of a given link. NavigationLink.GetBestLinkText() evaluates all of them and attempts to supply the best fit. The strategy is based on overriding the concept of "name". Here are the rules: - If Use This Display Name is checked on the NavigationLink item, it wins. - If the Link.Text is supplied by the user, it wins. - If the Link.TargetItem exists and inherits from Page Navigation Title, and the field value is not null, it wins. - If the Link.TargetItem exists its DisplayName is used. - Assuming all other things are not true, use the NavigationLink's DisplayName. Note that in this condition if you intended to point to a Sitecore Item, you have a bad link. Branch (Context) Navigation: (implicitly defined. It follows the shape of the Content Tree) - BranchNavigationRepository.GetNavigation - Accepts the request Context Item (should be a Page) and generates a tree of BranchNodes representing the nearest LandingPage, its children, as well as the descendants of any children that are Ancestors of the Context Item. (will also create Children for the Context Item node in the tree). Use this to produce the expanded navigation seen on many sites with deep content. Breadcrumbs: (implicitly defined. It walks up the Content Tree to get the path) - BreadcrumbNavigationRepository.GetNavigation - Accepts the request Context Item and Context SiteInfo. Generates an array of Breadcrumb models you can enumerate on your View. The breadcrumbs will start on your Site's StartItem and end with the supplied Context Item, which will be marked IsContextItem so you can change your rendering behavior. Uses the Item.Axes.GetAncestors() method to generate the list of breadcrumbs. The included package must be installed to use this library. This should happen automatically after you build and deploy your project.
Compatible with Sitecore 10.0 Requires Sitecore 10.0 Requires .NET Framework 4.8 Constellation is a collection of utilities for .NET CMS implementers. The Feature.PageTagging namespace contains controllers that will render the following meta tags when installed on page: - name=keywords - name=description - name=publisher - name=author - name=robots - name=twitter:card - name=twitter:creator - name=twitter:site - property=og:url - property=og:title - property=og:description - property=og:image These tags provide good SEO support as well as good support for Facebook and Twitter. The Sitecore Package in /Installation-Packages must be installed to take advantage of this library. The package includes: - Data Templates for the fields required to support these tags. Your pages should inherit from these to take advantage of this library. - List items where fields have a limited choice of values. - Rendering definitions. The package should self-install when you build and deploy your project. To use, in your Layout, at the appropriate location enter the following: @Html.Sitecore().Rendering("/sitecore/layout/renderings/feature/constellation/page tagging/page metadata") @Html.Sitecore().Rendering("/sitecore/layout/renderings/feature/constellation/page tagging/page search engine directives") @Html.Sitecore().Rendering("/sitecore/layout/renderings/feature/constellation/page tagging/page social metadata")
VERSION 10.0 is compiled for Sitecore 10.0 use and will not work on earlier versions. Requires Sitecore 10.0 Requires .NET 4.8 Constellation is a collection of utilities for .NET CMS implementers. The Foundation.Mvc assembly contains enhancements to Sitecore's MVC Rendering system: GenerateRenderingSpecificCacheKey Mvc.RenderRendering pipeline processor: Replaces the default GenerateCacheKey processor. Includes the ID of the Rendering in the cache key, this allows for multiple renderings with different presentation to use the same Datasource and be cached by Datasource without issues. MinifyAndAddRecordedHtmlToCache Mvc.RenderRendering pipeline processor: Replaces the default AddRecordedHtmlToCache processor. Uses the WebMarkupMin library to process the output HTML, Javascript, and CSS and minify it to improve page delivery time through file size reduction. The default settings are "safe" but effective, however WebMarkupMin offers far more aggressive minification settings for the bold. GetControllerRenderer Mvc.GetRenderer pipeline processor: Replaces the default GetControllerRenderer. Allows the developer to rely on the name of the Rendering to locate the appropriate controller to execute (convention over configuration). Very handy for Renderings that have a dedicated controller with one action that always produces the same output. ConventionController: Provides a good base-class controller for Sitecore implementations: * Forces the use of the Index() controller action (overrides possible) * Provides the programmer with immediate access to the Rendering's DataSource and ContextItem (PageContext) * Requires the programmer to assemble the model from the above Items. * Automatically finds the View based upon the Rendering's XPath location in Sitecore EditorCompatibleView: Replaces the stock MVC View, and provides methods for determining if the Page Mode "IsExperienceEditor" and "IsExperienceEditorEditing" which are of particular use if the View needs to change behavior to support editors. ViewPathResolver: Independent engine for locating a View based on the Rendering Item's path in Sitecore. It has configuration settings that allow the programmer to specify the location of Renderings in Sitecore and how they map to the location of the Views on disk. See the provided config file for details.
Compatible with Sitecore 10.0 Requires Sitecore 10.0 Requires .NET Framework 4.8 Constellation is a collection of utilities for .NET CMS implementers. The Feature.PageAnalyticsScripts namespace contains controllers that will render 3rd party analytics and reporting scripts to the page. To get the controllers and supporting Data Templates, the included Sitecore package must be installed This should happen automatically when you build and deploy your project. After installation, some configuration within Sitecore is required. 1. You need to select a location for Page Analytics Scripts Items. 2. For each of the Controller Renderings provided in the package, you need to set the Datasource Folder field to the above location. 3. It is recommended that you create placeholders for the Html Header tag as well as the top and bottom of the Body tags. You can then assign the provided Controller Renderings to those locations in the Standard Values of your most basic Page Items. This module isolates the analytics script kit from actual pages, so you may share scripts on multiple pages (typically every page on a site references the same datasource). You can also "stack" scripts by adding multiple instances of the controller renderings with different datasources. This module does not directly support page/experience editor because: 1. Scripts are invisible 2. Their location in the HTML document may make it difficult to provide access to the rendering. Because maintaining these scripts requires knowledge of Javascript and Marketing Technology, it is recommended that only users familiar with the Presentation Details dialog maintain these objects.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated 273 11/20/2020 1,162 8/4/2020 695 6/4/2020 3,531 4/11/2019 880 3/6/2019 1,588 12/6/2018 413 12/6/2018 334 12/6/2018 329 12/6/2018 1,475 10/20/2018 2,963 6/15/2018 678 5/25/2018 920 5/25/2018 1,162 2/12/2018 2,484 12/1/2017 732 11/24/2017 619 11/24/2017 403 5/18/2020