20

This is an addition to Kyles answer. While you can do the full site definition for each site, it quickly becomes cumbersome and really for most of the settings you have the same values. So you can use property inheritance in the patch file. For example if we have 4 sites, we can create the first one with fill definitions, but for the others, we can just ...


18

You can configure Sitecore to respond to requests with different home nodes based on the url. To do so, you need to perform the following steps: Configure DNS appropriately. Add a binding in IIS for each hostname. Copy or rename the config file App_Config/Include/SiteDefinition.config.example to App_Config/Include/SiteDefinition.config Modify the config ...


16

In multi-site solutions, when you edit an item in the Experience Editor, Sitecore will by default resolve the site context using the value of the setting Preview.DefaultSite. It's located in Sitecore.config, and my guess is that you currently have it set to mysite1: <setting name="Preview.DefaultSite" value="mysite1"></setting> This means the ...


14

This is a pretty common business-case in Sitecore multi-site projects, and fortunately there is pretty good support for cross-site links OOTB. If what you need isn't available OOTB or if it isn't working the way that you want then it's pretty straight-forward and low-effort to customize the solution to your needs. See below for details: Enabling ...


14

If the workflows are not drastically different, you can achieve 'site-specific' workflow via content security. Step 1: Workflow security Create a single workflow definition with some generic access roles for each state. Use these only to grant access to the workflow states. Step 2: Content security Create a security role for each site and assign it to ...


13

It's possible to determine the Site an item "belongs" to using the LinkManager. This is how Sitecore resolves links internally when Rendering.SiteResolving = true and expanding links or resolving the Preview Site when Preview.ResolveSite = true. var item = Sitecore.Context.Database.GetItem("/sitecore/content/my-item"); SiteInfo site = Sitecore.Links....


12

Would that work for you? ancestor-or-self::*[@@templateid='{website-root-template-id-here}']/*[@@templateid='{shared-content-template-id-here}']/*[@@templateid='{contacts-node-template-id-here}'] This'll travel up the content tree to the nearest website root node (from any page) and then down to the respective Contacts node.


12

Probably the most terse: string itemPath = item.Paths.FullPath; SiteInfo site = SiteContextFactory.Sites .Where (s => s.RootPath !="" & itemPath.StartsWith(s.RootPath, StringComparison.OrdinalIgnoreCase)) .OrderByDescending(s => s.RootPath.Length) .FirstOrDefault(); itemPath is factored out of the LINQ for performance.


12

Seems like "working as intended", no? I mean - the way Sitecore does Site Resolving is, to work it's way down the list of defined <site> until it finds one that matches. And since your definition is set to trigger on "anything" (virtualFolder and physicalFolder being "/") - it will catch everything that isn't caught by shell and login and so on above. ...


11

Background The setting Analytics.ClusterName serves two main purposes: It is used as the identifier of the cluster that locks contacts in xDB; It is used by clusters to transfer sessions and jobs to other clusters. The first use case is, more or less, self-explanatory. I'll elaborate on session transfers. Let's say you have two clusters: www1.yoursite....


10

One thing to be aware of, is that in Sitecore's Site Provider, order of sites is incredibly important. If for some reason, your order has become unordered.. and the scheduler site shows up in the list BEFORE other site definitions, then Sitecore will land on the scheduler site as the Site for the current Context. Sitecore's Site Provider processes sites ...


9

This is one of those questions where there are multiple answers available. The answer above by Kyle Trauberman is the default, configuration way that Sitecore provides to do multiple sites. It has it's pro's and con's. There are also a handful of modules on the Sitecore Marketplace, such as Dynamic Sites Manager, that provide the ability to create sites ...


9

Your website is not set up correctly in the <site> config node of the web.config Try to load /sitecore/admin/showconfig.aspx and search for <sites> Within <sites> look for the <site> node that defines your website (this will be the one with the rootPath attribute pointing to the Sitecore content root item for your site) Verify the ...


9

There is no out of the box way to make custom link manager configurations scope to a particular site, however you could always include that logic in the custom link manager itself. You can make your link manager resolve the site that a link is for. Then, if the resolved site is Site A then use the custom link manager logic; otherwise, if the resolved site is ...


8

I have done this before by using a custom handler to provide the sitemap. In the handler I used the SearchAPI to pull a list of all items that are derived from a _Sitemap template and that have the field in that template (Hide from Sitemap) set to false. The output of the handler is stored in the Sitecore HtmlCache, so on a publish the cache is cleared and ...


8

It's lowercase hostname in your defintion. There must be capital N: hostName. Site attributes are case sensitive. Should be: <site name="website" enableTracking="true" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/brands/clientname" startItem="/home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="...


8

What I ended up doing is registering a single route on pipelines/initialize: <pipelines> <initialize> <processor type="MyFramework.Routing.RegisterVirtualFoldersRoutes, MyFramework" patch:before="processor[@type='Sitecore.Mvc.Pipelines.Loader.InitializeRoutes, Sitecore.Mvc']" /> </initialize> </pipelines> and ...


8

As much as I hate to put this as an answer, but this is not a Sitecore issue. this doesn't fail: http://sitecoredemo/sitecore/service/notfound.aspx/%20/ neither does http://sitecoredemo/sitecore/service/notfound/%20/ neither does http://sitecoredemo/sitecore/%20/ just http://sitecoredemo/%20/ I have tested this on IIS 7, IIS8, and IIS10. On Sitecore ...


7

You need to follow next steps: Download Language Registration tool from https://marketplace.sitecore.net/en/Modules/Custom_Language_Registration.aspx Start the “Language Registration” tool Change the name to “pt-MX” Click the “Register” button Declare a new language in the “\App_Config\LanguageDefinitions.config” file: //Example <language id="pt" ...


7

The sites are recognized using hostname and virtualPath. If your users login to EE using hostname from mysite1 and edit items they are using following url: http://mysite1?sc_itemid={...} so Sitecore, when attempting to recognize the site will match it to mysite1 because the hostname will match even if the actual item is from mysite2


7

You can use URL Rewrite module for your issue : 1) Open the Internet Information Services(IIS) Manager 2) Select “Your Web Site” 3) In the Feature View click “URL Rewrite“ 4) In the “Manage Providers” pane on right hand side click on “View Rewrite Maps…” and then select "Add Rewrite Map.." 5)Set the map name, SpaceMap for example 6) In the “...


7

In Azure Portal, on your CD's (or other instances) you can add custom domains. Before doing so, you will need to add DNS records for those domains. You can CNAME them to the xxx-cd.azurewebsites.net site. After that, it is just standard sitecore, where you need to add those domains in your sitecore configuration (sites node).


7

This can happen if you follow the install guide and install Sitecore Powershell Extensions after installing SXA. When installing SPE, it will prompt about a scripts item already existing. If you selected to overwrite, it will delete the SXA powershell scripts. Instead, select Skip. To fix this, simply install the SXA package again.


6

As the other comments have mentioned the hostnames in the config need configuring however alongside that there are quite a lot of things to consider for multi-site in Sitecore and the difficulty of getting it to work depends on if it was considered in the initial build or not. I'll jot down some bits and pieces to consider, especially in the scenario where ...


6

Working multiple teams in one Sitecore solution is a question of discipline and organisation. By organisation I primarily mean how and where assets for the sites are stored and organised. To start with your example however; different sites needing different membership providers. You don't actually map sites directly to a provider, you map them to a default ...


6

I've put a lot of thought into how I might go about formulating an answer to this question. If anyone knows me personally, they'll know I'm pretty passionate about things that I care about, and Dynamic Sites Manager was pretty much the love child between immense frustration about how other Site Managers were going about doing it and the fact that I had a ...


6

If you will have the same domain but different rootPath, you will need to make use of the virtualFolder and physicalFolder attribute in the sitedefinition.config. The virtualFolder and physicalFolder will allow you to use the same domain but having different sites that hits different rootPath. This will allow you to have less coding. Site Definition ...


6

When you say package, I am assuming you mean a Sitecore package ending in .update. If you mean a zip file from the Sitecore Package Designer, then option two below isn't valid. You always want to have some way of getting back to pre-deployment is something goes wrong. Full backup (this is what I do in production) Your 1st option is to just back up the ...


6

First, start by adding multiple appender to your app.config: <appender name="site1" type="log4net.Appender.RollingFileAppender"> <file value="site1.txt" /> <appendToFile value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %message%newline" /> ...


6

Sitecore does not resolve the Sitecore.Context properly in case of the HttpPost through AJAX requests. I would suggest to add the siteName as a parameter to your Action as part of the ExampleModel and pass this data in the AJAX request, example code below, then you can fetch the needed site by the name. public ActionResult Index() { return View(new ...


Only top voted, non community-wiki answers of a minimum length are eligible