简体   繁体   English

TYPO3 9.5.x URL Segment (slug) 忽略页面

[英]TYPO3 9.5.x URL Segment (slug) ignore page

In the past we organized pages inside the page-tree by putting them into pages like "meta" or "submenu".过去,我们通过将页面放入“元”或“子菜单”之类的页面来组织页面树中的页面。 These pages had the option "exclude from speaking url" so their name was not rendered to the url.这些页面具有“从说 url 中排除”选项,因此它们的名称不会呈现到 url。

Is there any option to do this in TYPO3 9.5 to ignore pages from generating the "slug"?在 TYPO3 9.5 中是否有任何选项可以忽略生成“slug”的页面?

as example:例如:

WRONG: https: //www.somedomain.tld/metamenu/terms-and-conditions/错误:https://www.somedomain.tld/metamenu/terms-and-conditions/

RIGHT: https: //www.somedomain.右图:https://www.somedomain。 tld/terms-and-conditions/顶级域名/条款和条件/

How to "ignore" the page "metamenu" for automatic-generating the slug?如何“忽略”页面“metamenu”以自动生成slug?

Best regards Johannes最好的问候约翰内斯

It is mandatory for a page to have set a slug and every menulevel will generate another url part.页面必须设置一个 slug,每个菜单级别都会生成另一个 url 部分。 It is not possible to exclude a page - think about how to access this page via url无法排除页面 - 考虑如何通过 url 访问此页面

Here Mathias Schreiber tells a bit about this feature: Feature Demo - Speaking URLs Part 1 Mathias Schreiber 在这里介绍了一些有关此功能的信息:功能演示 - 说 URL 第 1 部分

Have you tried using a Folder instead of a "Page"?您是否尝试过使用文件夹而不是“页面”?

page/page/page somedomain.tld/metamenu/terms-and-conditions/ page/page/page somedomain.tld/metamenu/terms-and-conditions/

page/folder/page somedomain.tld/terms-and-conditions/页/文件夹/页 somedomain.tld/terms-and-conditions/

You can leave the parent-page as it is and edit your child-pages.您可以保留父页面并编辑您的子页面。 There you can delete parts of the urls in the slug-field.在那里您可以删除 slug-field 中的部分 url。

There's a feature in RealURL for TYPO3 8.7 "Exclude from speaking URL". TYPO3 8.7 的 RealURL 中有一项功能“从说话的 URL 中排除”。 If set 'domain.com/page-one/' loads 'page-one' and 'domain.com/subpage-of-page-one/' loads 'subpage-of-page-one' with no need of 'page-one' in the URL.如果设置 'domain.com/page-one/' 加载 'page-one' 和 'domain.com/subpage-of-page-one/' 加载 'subpage-of-page-one' 而不需要 'page-一个'在 URL 中。

The very same thing can be achieved in TYPO3 9.5 manually editing slugs but you can't set the parent page to be excluded from the URL automatically.在 TYPO3 9.5 手动编辑 slugs 中可以实现完全相同的事情,但您不能将父页面设置为自动从 URL 中排除。 It's a missing feature.这是一个缺失的功能。

I had the same Problem.我有同样的问题。 Sadly there is no "good" solution as far as i know.可悲的是,据我所知,没有“好的”解决方案。 But there is a little trick.但是有一个小技巧。 You can fix this in the database.您可以在数据库中修复此问题。 I deleted all my "slug"-entries in in the database for my pages.我在我的页面的数据库中删除了所有“slug”条目。 Then i wrote in all pages wich should not show in the url in slug "/".然后我在所有页面中写了不应该在 slug“/”中显示的 url。 This does sadly not work in TYPO3, because the BE allows just one "/" and the second "/" will be changed to "/1".遗憾的是,这在 TYPO3 中不起作用,因为 BE 只允许一个“/”,而第二个“/”将更改为“/1”。 But in the Database you can do it.但是在数据库中你可以做到。 After you edited the slug for your page metamenu and other to "/", you can go into the upgrade-wizard in the installtools, reset the "generate slugs" task and run this task again.将页面元菜单和其他的 slug 编辑为“/”后,您可以进入 installtools 中的升级向导,重置“生成 slugs”任务并再次运行此任务。 This is sadly the only solution i came up with.可悲的是,这是我想出的唯一解决方案。

TYPO3 扩展“masi”提供了此功能,包括迁移 realurl tx_realurl_exclude设置的升级向导。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM