Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Extensibility for uriPathSegment #4835

Open
1 task done
lorenzulrich opened this issue Jan 15, 2024 · 0 comments
Open
1 task done

FEATURE: Extensibility for uriPathSegment #4835

lorenzulrich opened this issue Jan 15, 2024 · 0 comments
Labels

Comments

@lorenzulrich
Copy link
Contributor

Is there an existing issue for this topic?

  • I have searched the existing issues

Description

Currently, the uriPathSegment generation cannot be configured and it is quite hard to replace it since the NodeUriPathSegmentGenerator does not implement an interface. It would be nice to make it configurable on the Node Type definition level.

Possible Solution

I suggest an approach using EEL similar to the node label or node templates, of course naming and configuration should be discussed:

'My.Site:Document.NewsPage':
  options:
    uriPathSegmentGenerator:
      # Example: my-great-news-a1b2c3d4
      uriPathSegmentConfiguration: '${data.title + '-' + String.substr(String.sha1(data.title), 0, 8)}'

Or:

'My.Site:Document.NewsPage':
  options:
    uriPathSegmentGenerator:
      # Example: my-great-news-a1b2c3d4
      uriPathSegmentConfiguration: '${data.title + '-' + Date.format(data.date, 'Y-m-d')}'

This configuration would override the default generation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant