tag:blogger.com,1999:blog-18939862.post2703926748729959115..comments2023-07-25T01:20:13.916-07:00Comments on Sitecore CMS Blog by Alex Shyba: Sitecore Product URLs Amazon StyleAnonymoushttp://www.blogger.com/profile/09553655443086620502noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-18939862.post-4062655176199968342014-10-27T08:36:50.139-07:002014-10-27T08:36:50.139-07:00Hello,
I'd try to re-route IDTable to web dat...Hello,<br /><br />I'd try to re-route IDTable to web database (simple config change).<br />This way, assuming your are sharing the web database between CD environments, it should work there too.<br /><br />-alexAnonymoushttps://www.blogger.com/profile/09553655443086620502noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-17263506874122533112014-10-26T19:38:15.167-07:002014-10-26T19:38:15.167-07:00Hi
This solution is fantastic.I have 2 questions ...Hi<br /><br />This solution is fantastic.I have 2 questions on it.I tried the same scenario as you mentioned above.<br /><br />1.Custom Url & its associate id is getting stored in the IDTable of master database.my question is like when you go for live,where does it refer when we call the custom url.Does it refer master database?<br /><br />2.If we have more than 2 CD environments,How does it work?.Do i have to point 2 databases in the IDTable config?arjunanhttps://www.blogger.com/profile/14862462080330367460noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-2611248671370557442014-02-24T05:39:55.172-08:002014-02-24T05:39:55.172-08:00Thanks Alex, that helps clear things up, that and ...Thanks Alex, that helps clear things up, that and I did some research in the meantime regarding IDTable.<br /><br />Another question, how will this behave in a multilingual implementation? Any gotchas you can think of that I should be looking for?<br /><br />Thanks again!Kyle Heonhttps://www.blogger.com/profile/04304204101304199022noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-14009845537299076812014-02-23T19:31:03.698-08:002014-02-23T19:31:03.698-08:00Hi Kyle,
The IDTable is used here for persistence...Hi Kyle,<br /><br />The IDTable is used here for persistence of the short url to item id. You can either resolve the URL dynamically, which might be more expensive, or persist the mapping somewhere else :-)<br />The point I was trying to make here is to showcase the flexibility of link generation mechanism and moving pieces involved to make such custom URL happen (LinkProvider&ItemResolver).<br /><br />Hope this answers your question.<br /><br />-alexAnonymoushttps://www.blogger.com/profile/09553655443086620502noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-75488182792136151602014-02-21T12:25:54.091-08:002014-02-21T12:25:54.091-08:00Hey Alex, sorry to revisit such an old post but I&...Hey Alex, sorry to revisit such an old post but I'm dealing with an issue that I think this might solve for me. I'm not all that familiar with the IDTable piece, is it possible to do this w/o touching IDTable? Could this be handled just by a modified LinkProvider? Just contemplating options. Thanks!Kyle Heonhttps://www.blogger.com/profile/04304204101304199022noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-74723175084757988382011-02-02T15:03:55.262-08:002011-02-02T15:03:55.262-08:00Hi Mark,
Thanks for the feedback guys.
Mark:
I ...Hi Mark,<br /><br />Thanks for the feedback guys.<br /><br />Mark:<br /><br />I would not agree that it is a lot of work, the solution is actually very simple. The save handler - I used it only for the sake of simplicity. In reality, I'd leverage something else. Maybe a workflow action that makes sure that the mapping table is updated every time a version is published.<br /><br />I would not use Lucene simply because in two server setups the front-end index is not updated immediately, and URL is a very critical component.<br /><br />Mapping table seems like the only bulletproof and quite lightweight way to go. How you populate it is another question (item:saved, wf action or publish:item processor).<br /><br />I would also not put a lot of additional string processing on this side as both CustomItemResolver and LinkManager are used quite frequently on the delivery side. Reading from a mapping table is easy, plus you can cache it in memory. Messing with strings and querying Lucene every time an custom item is being resolved or a link is being generated could be more expensive.Anonymoushttps://www.blogger.com/profile/09553655443086620502noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-30631812952959632952011-02-01T23:44:20.178-08:002011-02-01T23:44:20.178-08:00It's one approach, but it does seem like a lot...It's one approach, but it does seem like a lot of work. Part of your URL will always be some sort of unique product identifier, and I would probably just go looking for this just before the Item Resolver attempts it in the request pipeline.<br /><br />Something like<br /><br />1) Split the URL up in its component parts, to find an ASIN. If found, continue.<br />2) Ask Lucene if the ASIN exists<br />3) If so, resolve the item in the pipeline to what Lucene found<br /><br />Saves you the extra trouble of creating save handlers etc, assuming of course that you have a current lucene index on your solution. And for a webshop, you always would have.Mark Cassidyhttps://www.blogger.com/profile/07054254475245848945noreply@blogger.comtag:blogger.com,1999:blog-18939862.post-11602288433697401152011-02-01T20:50:20.821-08:002011-02-01T20:50:20.821-08:00Interesting stuff! Would the CustomItemResolver b...Interesting stuff! Would the CustomItemResolver be a good way of handling URL aliasing?Dan Solovayhttps://www.blogger.com/profile/02204911460102862983noreply@blogger.com