0

I am planning to integrate following Visual studio project with Sitecore instance:

Sample.SC.Global ( MVC project ) --This project contains global/common implementation which will be used in Website1/Website2 for example Global Global/Footer Header(GlobalHeader.cshtml,GlobalFooter.cshtml in Area folder structure ) and I am using Areas in this MVC project

Sample.SC.Helper ( C# class library) --This will work as helper class library

Sample.SC.Website1 ( MVC project ) --This project contains Views specific to this website and use Global Header/Footer from Sample.SC.Global project

Sample.SC.Website2 ( MVC project ) --This project contains Views specific to this website and use Global Header/Footer from Sample.SC.Global project

Queries:

1.How to reference GlobalHeader.cshtml and GlobalFooter.cshtml in Website1 so that when I browse Website Global Header/Footer must display with views specific to Website1/Website2

2.In Sitecore GlobalHeader/GlobalFooter view rendering item Path field should I have to enter the path of these files from Sample.SC.Global MVC project

4

1 回答 1

0

我相信您可以在不创建 3 个网站项目的情况下完成此操作。您可以通过 1 个 Web 项目来实现它。由于您使用的是区域,因此您可以将每个“子站点”分解为一个新区域。

例如,这就是 Visual Studio 的样子 -Sample.Website

-

  • 全球的
  • 标题
  • 页脚

    • 领域
    • 站点1
      • 控制器
      • 意见
    • 站点2
      • 控制器
      • 意见

在 Sitecore 中,您将为共享项目创建 2 个单独的站点和一个单独的文件夹。请记住,您的站点/主页下的唯一项目应该是页面。任何其他项目都应该在文件夹名称组件或元数据或类似的东西中。

于 2016-03-10T02:23:46.203 回答