RealURL:菜单和首页链接的正确策略?
场景
我有一个带有几个自动生成的菜单的网站:
- 主菜单(“根级别”页面)
- 树形菜单(完整的树向下到当前页面)
- 面包屑(仅
.ACT
)
现在我看到了关于这些的两种可能性菜单和RealURL扩展。
策略 A:根作为首页
我将像这样创建页面树:
⊛ www.site.tld
↳ Page 1
↳ Page 2
↳ Page 3
优点和缺点缺点 缺点
- :我必须手动将指向“首页”(页面“www.site.tld”的内容)的链接添加到菜单的所有排列(因为这与其他“根”不在同一物理级别上)优点
- :RealURL 将默认将所有到首页(根页面)的链接呈现为
/
策略 B:首页作为树中的单独页面
我将像这样创建页面树:
⊛ www.site.tld
↳ Front page
↳ Page 1
↳ Page 2
↳ Page 3
优点与优点缺点
- 优点:指向“首页”的链接会自动添加到菜单的所有排列中(因为这是正确级别上的显式页面)
- 缺点:RealURL 默认会将所有指向首页的链接呈现为
/ front-page/
而我希望它链接为/
最佳实践?
front-page-as-root 与 front-page-as-separate-page 问题是否有最佳实践?即,我应该选择 A 并手动扩展菜单,还是选择 B(如果是这样,如何配置 RealURL 来呈现正确的链接)?
编辑:答案
Phil为我提供了具体问题的解决方案。 采用策略 B,但让页面“首页”成为根目录(页面“www.site.tld”)的链接(dokType
= 快捷方式)。这将修复菜单和链接。 (“首页”是一个快捷方式,内容将驻留在“www.site.tld”上。)
如果有人知道此页面的替代方案,请告诉我。不过,我相信这将满足我对这个问题的需求。
The Scenario
I have a website with several autogenerated menus:
- Main menu ("root level" pages)
- Tree menu (full tree down to current page)
- Breadcrumb (only
.ACT
)
Now I see two possibilities regarding these menus and the RealURL extension.
Strategy A: Root as Front Page
I will create the page tree like so:
⊛ www.site.tld
↳ Page 1
↳ Page 2
↳ Page 3
Pros & Cons
- Con: I will have to manually add a link to the "Front Page" (content from page "www.site.tld") to all permutations of the menus (as this is not on the same physical level as the other "root level" pages)
- Pro: RealURL will per default render all links to the front page (the root page) as
/
Strategy B: Front Page as Separate Page in Tree
I will create the page tree like so:
⊛ www.site.tld
↳ Front page
↳ Page 1
↳ Page 2
↳ Page 3
Pros & Cons
- Pro: A link to the "Front Page" is automatically added to all permutations of the menus (as this is an explicit page on the correct level)
- Con: RealURL will per default render all links to the front page as
/front-page/
while I want it to link as/
Best Practice?
Is there a best practice in the front-page-as-root vs. front-page-as-separate-page question? I.e, should I go with A and manually extend the menus, or with B (if so, how to configure RealURL to render the correct links)?
Edit: The Answer
Phil provided me with a solution to the specific problem. Go with strategy B, but let the page "Front page" be a link (dokType
= shortcut) to the root (the page "www.site.tld"). This will fix the menus and the links. ("Front page" being a shortcut, contents will reside on "www.site.tld".)
If anyone knows of alternatives to this one, please let me know. I do believe, however, that this will satisfy my needs concerning this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到两个解决方案(如果我真的理解你的问题)。
解决方案 B 更容易,并且无需特殊的 RealURL 配置即可完成
I see 2 solutions (if I really understand youre question).
The solution B is easier, and it can be done without a special RealURL config