6

DD4T experts !!

I need one Help in understanding topology configuration with respect to DD4T, I am well aware of DXA, but DD4T is giving me hard time here.

Question:

How DD4T deals with Web 8 Topology Mapping?

Consider this:

The website hosted in IIS with a Url – localhost:82, will look for mapping in Topology for the ttmWebsite and then pick up the site ID – Website1, which intern look for ttmMapping with ID – Website1_RootWebApp.

This means - If localhost:82 is not one of the base urls, the site will throw – Localization Error.

But what is happening in my case (where my application is DD4T) - even if the particular mapping is not availble with port 82, my site still works on any port. Within Visual Studio on port 33568 blah blah, in IIS on localhost:82 92 93 94 etc.

so basically it does not bother on the port, where do we have this setup?

How Discovery Service is mapping page request to broker? If there are no proper mappings? I know the page provoder is slightly different in DD4T than DXA.

But I am not sure where and what to look?

Thanks in advance !

  • I learn from Nuno - that adding <add key="DD4T.PublicationId" value="7" /> in respective App.config of the site would help, which indeed fixed my problem. @Nuno - can you please put your answer with little more info here so that I can mark it answered. – Vikas Kumar Jul 24 '17 at 15:50
2

Regarding the topology mapping and DD4T, the answer is pretty simple : the default dd4t implementation just doesn't use the topology manager for mapping a url to a publication.

DD4T has a PublicationResolver class, which is responsible for detecting the correct publication ID.

The default implementation simply takes this ID from the web.config see https://github.com/dd4t/DD4T.Core/blob/a5855c7dea5763a8d03f66c100d3352ac89bd79b/source/DD4T.Utils/Resolver/DefaultPublicationResolver.cs

Now, it is possible to write this, you then have to write your own implementation of this IPublicationResolver that looks at the CD service.

DXA does this slightly different indeed, and DXA does use topology manager to get the publication ID (https://github.com/sdl/dxa-web-application-dotnet/blob/23c8c40127cf2bc47dc4fc6d5b5b2430216bb8f9/Sdl.Web.Tridion/CdApiLocalizationResolver.cs), or it uses cd_dynamic_conf (https://github.com/sdl/dxa-web-application-dotnet/blob/23c8c40127cf2bc47dc4fc6d5b5b2430216bb8f9/Sdl.Web.Tridion/CdConfigLocalizationResolver.cs) in case topology manager isn't used.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.