Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Add option to add paths or route selection to the orginalUrl field #2

Open
ElectricMaxxx opened this issue Feb 2, 2014 · 11 comments
Open
Milestone

Comments

@ElectricMaxxx
Copy link
Member

instead of setting string url's to the SeoMetadata i would prefere the routes selection from the treebrowser for setting the redirect/canonical url.

@ElectricMaxxx
Copy link
Member Author

When i say user types into a textbox, i think on the current implementation, where i have created a form type for the admin class. This form type contains this textbox i do not realy like. The question is: how to store the Route to the original content?

  • cmf Route
  • symfony path
  • just as the url

@dbu
Copy link
Member

dbu commented Feb 17, 2014

i think we should have a selection out of the routes that content currently is linked with, to select the correct one. (and most of the time, this should not be relevant anyways, as a content should only have one Route document per locale, all others should be redirects anyways)

if you want to handle the situation of several routes at all, i would store the uuid of the route document, as that is least likely to change.

@ElectricMaxxx
Copy link
Member Author

Yes i think too. If the doc implements the RouteRefferesInterface i will show a selection of the current routes a text field for manually writing it else.

But i wouldn't agree with you that a doc does have only one mapped route. I'm working at a tourism project at work. There i wan't to build documents for the poi's (points of interesst). They are mapped to several categories, which belong to one category group. So i plan to create routes like that: /category_group/category/poi_name. As you see the content of the poi will be shown on a lot of routes - as many categories a poi has got. i.e a hotel can have a restaurant. So i will get:

  • /Eating/restaurant/poi_name
  • /Sleepings/hotel/poi_name
  • /poi/poi_name (as default)

This is a lot of work for me to hold it in sync, but for this case i would take the default route as the canonical one by default. I just imagine that a extract strategy for routes would make sense too. (#23)

This was referenced Feb 22, 2014
@dbu
Copy link
Member

dbu commented Feb 24, 2014

ah, thanks for the example. i see your point now, why you would have multiple routes. very interesting indeed. will be interesting to get the menu right as well... but with the current menu item voter, should be doable.

for the selection, i would only support RouteReferrersReadInterface - if a content does not implement that, you can't generate a URL to it, and manually typing a url is strange - or would you see that as hacky solution to integrate with external systems that handle that url even though its not available in the symfony application?

@ElectricMaxxx
Copy link
Member Author

To the example:

if those poi's will get an own menu entry (mostly seen in some filtered lists) i will make a default route /poi/poi_name which will be the cannonical one too.

For selecting the route i would like to stay in the cmf system. So if the content implements the RouteReferresReadInterface i will show a selection of all mapped route a text field else. I can use the "now useable" uuid of the route to store, cause the SeoMetadata is no own document, where i can make references. By doing this i can make check for UuidHelper:isUuid($route) and get the route for setting the value or just using the string.

But i can imagine a Strategy solution as for titles and descriptions too.

@dbu
Copy link
Member

dbu commented Feb 26, 2014

lets do it without the strategy i would say, to not overcomplicate. if we realize it needs more complexity, we can still expand.

@ElectricMaxxx
Copy link
Member Author

Ok.

I think i will do that this evening when implementing the test for the admin extension.

@ElectricMaxxx
Copy link
Member Author

I am struggling with my self why not delay this to the next version. It is just a feature, won't cause any BC-breaks. I i got time on Friday/Saturday i will do it, but can be delayed or?

@dbu
Copy link
Member

dbu commented Mar 26, 2014

lets focus on releasing 1.0 - we can follow with a 1.1 in a month if there is a lot of new interesting stuff... and we will notice issues in the real live i am sure, and then change some thing or other.

@ElectricMaxxx ElectricMaxxx modified the milestones: init version, 1.1 Mar 26, 2014
@ElectricMaxxx ElectricMaxxx modified the milestone: 1.1 Mar 27, 2014
@ElectricMaxxx ElectricMaxxx modified the milestones: 1.2, 1.1 Oct 7, 2014
@dbu
Copy link
Member

dbu commented Jul 28, 2015

remove the milestone? or just close this?

@ElectricMaxxx
Copy link
Member Author

ElectricMaxxx commented Jul 28, 2015 via email

@dbu dbu removed this from the 1.2 milestone Jul 28, 2015
@ElectricMaxxx ElectricMaxxx added this to the 2.0 milestone Feb 13, 2016
@ElectricMaxxx ElectricMaxxx added this to the 2.1 milestone Nov 28, 2016
@ElectricMaxxx ElectricMaxxx removed this from the 2.0 milestone Nov 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants