sulu / SuluArticleBundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system
MIT License
52 stars 77 forks source link

Adjust documentation to configure live-generation of URL #581

Closed niklasnatter closed 1 year ago

niklasnatter commented 3 years ago

What's in this PR?

This PR adjust the documentation in the repository to allow for liver-generation of the URL inside of the article template.

Why?

Because the current behaviour provides a bad UX and is inconsistent to page. See #514 and #580

rogamoore commented 1 year ago

Hi @niklasnatter, while working on https://github.com/sulu/SuluArticleBundle/issues/538 I was wondering if when using the possibility to configure the route_schema directly in the XML template as described in this PR (see https://github.com/sulu/SuluArticleBundle/blob/2.x/Resources/doc/routing.md#overwrite-route-schema-in-template) if the YAML configuration (see https://github.com/sulu/SuluArticleBundle/blob/2.x/Resources/doc/routing.md#route-schema) is still needed?

niklasnatter commented 1 year ago

I think the route_schema of the template will only be used for live generation when creating an article via the admin UI. If you create an article programatically (eg. via fixtures), only the configuration in the .yaml file will be used.

rogamoore commented 1 year ago

Thanks! So the right way to achieve correct route generation programatically would be to duplicate the configuration also in the YAML file? Is there any way to reuse the XML config?