在阅读消息来源以确定how to do hierarchical URLs in Orchard时,我在SlugTokens.cs
中看到了这一点:
// /path/to/parent-item/
.Token("ParentPath", T("Parent Path"), T("The parent item's path and slug with an appended forward slash if non-empty"));
这在哪里使用?内容类型是否具有可用于创建层次结构的父属性?
答案 0 :(得分:0)
是的,如果您的内容类型具有公共部分(并且大多数应具有公共部分),则存在Container属性。它也可以从令牌获得:{Content.Container.Path}/{Content.Slug}
是博客文章的自动模式。我认为它相当于{Content.ParentPath}/{Content.Slug}
。