You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently an entity's slug is has two customisation options: Slug directory and Slug item prefix which support variables like #T:
This still limits urls to a "flat" structure always having the same base slug directory. To create more meaningful urls, I would like to have extended url customisation with the support of an entity's field values. For this I would propose a syntax like :[field_name].
If for example I have a blog-post with a field named category, I would like to be able to use the value of this category in the url. I would be able to to this by entering :category as the slug item prefix, like so:
If I would now create a new blog-post naming it Highest buildings and selecting the category Architecture, this would result in the slug blog/architecture/highest-buildings.
This would also be a solution for i18n support in the front-end. In your entity's definition you could at a field for language. In the slug you could use :language/blog. Since this would be an entity property in the templates as well you can also use it to set the lang attribute in the HTML.
The text was updated successfully, but these errors were encountered:
jbmoelker
added a commit
to jbmoelker/webhook-generate
that referenced
this issue
May 15, 2015
`:[field_name]` in slug is replaced by the value of that field. For example `tutorials/:category` for an item which has selected 'HTML and CSS' as category would result in `tutorials/html-and-css`.
resolveswebhook#36
@snide@LtSquigs have you had time to have a look at this? Currently involved in another project which could really benefit from this feature. Thanks in advance!
Currently an entity's slug is has two customisation options: Slug directory and Slug item prefix which support variables like
#T
:This still limits urls to a "flat" structure always having the same base slug directory. To create more meaningful urls, I would like to have extended url customisation with the support of an entity's field values. For this I would propose a syntax like
:[field_name]
.If for example I have a blog-post with a field named category, I would like to be able to use the value of this category in the url. I would be able to to this by entering
:category
as the slug item prefix, like so:If I would now create a new blog-post naming it
Highest buildings
and selecting the categoryArchitecture
, this would result in the slugblog/architecture/highest-buildings
.This would also be a solution for i18n support in the front-end. In your entity's definition you could at a field for
language
. In the slug you could use:language/blog
. Since this would be an entity property in the templates as well you can also use it to set thelang
attribute in the HTML.The text was updated successfully, but these errors were encountered: