Umbraco - 文档的替代链接不正确 [英] Umbraco - Incorrect alternative link to document

查看:206
本文介绍了Umbraco - 文档的替代链接不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的网站上,我们有以下结构:

On our website, we have the following structure:


sitename
  -Global
    -English
  -UK
    -English

对于全球>英文页面,该页面的链接显示为:

for the Global > English page, the links to the page are showing as:

文档链接

/ global / en /

/global/en/

替代链接

http://english

所以'链接到文档'是正确的,但替代链接不是。在英国>英文页面上,我只是得到了正确的文档链接。我已经尝试发布整个网站,但我不能超时(我已经尝试增加所有超时,但它需要一个小时发布,所以我得到一个奇怪的网络错误),只是重新发布整个全局节点和子文档不能解决问题。还有其他办法解决这个问题吗? 替代链接的目的是什么?这些是如何确定的?

so the 'Link to document' is correct, but the alternative link isn't. On the UK > English page, I just get the correct 'Link to document'. I've tried publishing out the whole site but I can't as it times out (I've tried increasing all the timeouts, but it's taking an hour to publish so I get a strange network error), and just re-publishing the whole 'Global' node and sub-documents doesn't fix things. Any other way to fix this? Also what is the purpose of the 'Alternative Links' and how are these determined?

推荐答案

正如我在你的原帖中所建议的那样,我设置了一个非常基本的Umbraco v6.1.2实例(在Visual Studio中使用NuGet),它具有单个doc类型和与你所描述的相同的顶层结构。

as I suggested in your original post, I set up a very basic Umbraco v6.1.2 instance (using NuGet in Visual Studio) with a single doc type and an identical top-level structure to what you have described.

所以:


  1. 在web.config中将umbracoUseDirectoryUrls设置为true

  2. 调用的doc类型BasicPage有一个名为umbracoUrlName的属性。这允许您根据节点的标题覆盖Umbraco创建的路径。我假设你的文档类型已经有了。

  3. 我将两个英文节点设置为umbracoUrlName为en。

  4. 我添加了两个主节点到Root节点 - localhost和mobile.localhost

  5. 我发布了Root节点和所有后续节点

  1. Set umbracoUseDirectoryUrls to true in the web.config
  2. The doc type, called "BasicPage" has a single property called "umbracoUrlName". This allows you to overwrite the path created by Umbraco based upon the title of the node. I assume you already have that in your doc type.
  3. I set both English nodes to have a umbracoUrlName of "en".
  4. I added two hostnames to the Root node - "localhost" and "mobile.localhost"
  5. I published the Root node and all following nodes

正如您所看到的,链接到文档和替代链接都是预期的。

As you can see, both the "Link to document" and "Alternative links" are as expected.

我怀疑您尝试将网站设置为正确发布可能修复问题,因此您可能需要以分号发布网站,从分支到分支。

I suspect you may be right that trying to get the site to publish may fix the issue, so you may have to publish the site in bits, working from branch to branch.

但是,我会建议像我一样创建一个测试Umbraco实例,然后比较你拥有的。

However, I would advise creating a test Umbraco instance as I have done and then comparing what you have.

或者,如果整个内容结构要去,你当然可以完全删除主机名设置使用相同的主机名服务,因为这些主机名可以简单地控制IIS。 Umbraco实际上并不需要了解它们,除非您在同一内容树中有不同的不同站点。

Alternatively, you can of course remove the hostname settings altogether if the entire content structure is going to be served using the same hostnames as these can simply be controlled in IIS. Umbraco doesn't actually need to know about them unless you have separate distinct sites in the same content tree.

这篇关于Umbraco - 文档的替代链接不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆