开发者

Sitecore global url to specific url

开发者 https://www.devze.com 2023-04-09 00:01 出处:网络
Currently I am facing the following problem: A website, which I have to make for a company, has different locations. But the content of a few pages is for all locations the same. Now I have created a

Currently I am facing the following problem:

A website, which I have to make for a company, has different locations. But the content of a few pages is for all locations the same. Now I have created a global folder with the items for all the locations. But now I am facing the following problem: when accessing the global items from the website of a specific location I get the global url. But what I want is that the specific location url remains the same structure, for example:

  • Now it is www.url.com/global/subfolder/itemname
  • And what I want is www.url.com/location1/subfolder/itemname

Does anybody have any solution(s)/suggestion(s) for this problem?

Does anybody also have a solution for creating a menu to insert these global items but also to insert the locatio开发者_JAVA百科n specific items?

Some more information about my Sitecore content structure

  • Global: contains the global items for alle locations
  • Corporate: the corporate website of the company
  • Location1: the website of location1
  • Location2: the website of location2


Adam Weber was right, cloning is your best solution:

  1. Create your Global section, with all the child items you need
  2. For each of your local sections, clone the global section and place it where you'd like it to appear within your local menu


If I understand you correctly, this is what I'd do. It might not be the prettiest solution. But it'll work.

You have your "data" items in /global/subfolder/itemname

then just create some templates, which are "dummy" pages, that only contain a link to the global item (and perhaps the few fields that could differ (perhaps contact email for the specifik location).

Then you make a sublayout that bascially jsut gets the referenced item and uses that instead of Sitecore.Context.Item.

Then create an instance of the "dummy" template in /location1/subfolder/itemname and reference it to /global/subfolder/itemname

That way you URLs will be correct and the data will be the same.

Another and probably smarter solution (if you have enabled proxies) is to create a proxy that takes /global/subfolder/itemname as source and points to /location1/subfolder/ as target (or you could take /global/subfolder and check "include children".

Here is a Guide on how to use proxies in 5.3: http://sdn.sitecore.net/Articles/Administration/Using%20Proxy%20Items%20in%205,-d-,3.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消