Code Generation, GlassMapper for each feature: We have following TDS implementation in our solution:
One TDS project for each feature/foundation projects to pull corresponding items related to those projects
To accomplish this we have to refer Glassmapper assemblies and configs individually to all the feature or foundation projects. For e.g., Navigation Feature will have its own TDS project for item versioning as well as code generation and so on for all other projects. Another option we thought of was to move Glassmapper completely to foundation layer and use TDS generated classes from Foundation layer, but that would breach helix principles as feature templates will have to be pulled to foundation layer. Can you please let us know if there is another approach to restrict Glass mapper reference to minimal projects or if current approach is the best that can be achieved?
Dependency Injection : We are starting off with a new Project and we are using Helix principles. We have implemented Dependency Injection using the Configurator Approach and referred to kamsar’s blog for the same http://kamsar.net/index.php/2016/08/Dependency-Injection-in-Sitecore-8-2/ Steps we followed are:
Created a Dependency Injection project in Foundation. Added NuGet reference of Micrsoft.Extensions.DependencyInjection.Abstractions 1.0 Added the class ServiceCollectionExtensions given by Kamsar.
So, whenever we create a new Feature Project we must perform the following steps:
- Add reference to the Foundation project.
- Add NuGet Reference of Micrsoft.Extensions.DependencyInjection.Abstractions 1.0
- Create a class RegisterDependencies and add repository classes to Service collection.
- Add a config and add the RegisterDependencies class as a configurator in Sitecore services section in the config.
- We wanted to check with you whether our current implementation is a correct approach or not. At the same time, if you know of a better approach then please let us know.
- Can you tell us if we can implement Dependency Injection using Sitecore’s best practices as well as helix principles and register dependencies at a single location – i.e. say at the Foundation Project.
Social media options for sites under same tenant: We have structure like this
Now, if you look at Habitat example -- For Footer menu it has folder like this --
Now, what if SiteA and SiteB both has their own set of Footer options and they both have same footer rendering - We have few options to make this possible. But would like to know what's the best way to get this done.