Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Configuration Problems with 8.2.1 #30

Closed
williamsk opened this issue Jun 9, 2016 · 3 comments
Closed

Multiple Configuration Problems with 8.2.1 #30

williamsk opened this issue Jun 9, 2016 · 3 comments

Comments

@williamsk
Copy link

williamsk commented Jun 9, 2016

In my Habitat-like demo project, I have not been able to get multiple configurations to work out. Maybe I'm doing something wrong, but here's what's happening...

First, I have a feature project for Metadata that includes a base template with fields like Page Title, Meta Description, etc. In Habitat-style, this project contains all of the Unicorn and Sitecore configuration, controller, model, view, etc for this feature so I'd like to have the Synthesis code (interfaces and models) generate into this project.

I also have a "project layer" project that includes all of my page templates (the ones content authors will actually create instances of in Sitecore). These inherit from the Metadata template.

If I only configure Synthesis for the Metadata project, then my page which uses a page template from the latter project cannot be cast to the IMetadata interface ( Sitecore.Context.Item.As() ). Whenever I set up a Synthesis configuration for the other project, I get models that inherit from IMetadata but code inside of the Metadata project still cannot cast to IMetadata. I presume because that project doesn't reference the project containing the concrete implementation? (the dependencies have to flow the other direction - the page templates project can depend on the metadata project, but not the other direction).

I did try changing the order that the configurations are defined and the assemblies get added to the ConfigRegistrar, but that generated code that wouldn't compile (the page templates try to inherit from IMetadata in some weird looking namespace).

I have all of this in a smallish demo project that I can share if you want to look at it or if you want to jump on a screenshare session sometime... You can hit me up on Sitecore Slack as @kevin-williams.

@kamsar
Copy link
Collaborator

kamsar commented Sep 22, 2016

Did you ever get this working? I'm using it successfully in Helix-like implementations these days.

@kamsar
Copy link
Collaborator

kamsar commented Oct 12, 2016

Closing from inactivity, presumed solved.

@kamsar kamsar closed this as completed Oct 12, 2016
@williamsk
Copy link
Author

Sorry just saw this - I guess gmail was filing it under spam. I'll give
this another try since it's been like a month or more since I tried it.
Thanks!

On Wed, Oct 12, 2016 at 1:00 PM, Kam Figy notifications@github.com wrote:

Closed #30 #30.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#30 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACtSahBXLxfin1cArIRC-384JmQnkLI5ks5qzSBTgaJpZM4IyNU2
.

Kevin Williams
williamsk@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants