我想分类我的网页,并在路径中看到类别名称。
例如:代替http://localhost/a-funny-story,http://localhost/stories/funny/a-funny-story。
什么是最佳做法?我试着用Pathauto模块来完成它。我创建了一个内容类型,其中包含一个类别分类法的术语引用。
我在“内容路径”中使用这种模式[node:field_my_page_category]/[node:title]。但这并不适用于多层次的分类。我尝试使用"join“[node:field_my_page_categories:parents:join:/]/[node:title],就像提到的这里一样。
但我得到了一个错误:The Pattern for all Sayfa paths is using the following invalid tokens: [node:field_my_page_category:parents:join:/]。
发布于 2015-05-25 20:09:11
如果是节点,则需要使用Pathauto和Replacement Patterns,在Replacement Patterns中选择分类法术语并将其放在url中。

但是,如果您需要根据url列出一组内容,则需要使用视图并将这些术语添加为上下文过滤器。
发布于 2015-05-26 12:46:56
启用实体令牌模块并将模式更改为[node:field_my_page_categories:parents:join:/]/[node:field_my_page_categories:name]/[node:title]解决了我的问题。
https://drupal.stackexchange.com/questions/159506
复制相似问题