Thursday, January 12, 2006
Proxy template curiosity when proxying across databases
When linking items from external data providers, the current Sitecore strategy is, that one uses Shadow Items (also known as Proxy items, actually not sure which term is the "official"). And it works quite nicely, although I came across something I found a bit peculiar. When adding a new item based on the "system/Proxy" template, one can fill in the Target Item and Target Database fields. Target Item is a reference field, and Target Database is a plain Text field. When clicking the Target Item field, a navigational tree appears, allowing you to select the node you want the Proxy Item to point to. This defaults to the Master database (I assume the currently selected database). However... If you fill out the name of another database in the Target Database field, this doesn't change. I tried in various ways to get the shell to point to this new database and give me a navigational tree from there, but without luck. In the end, I modified my template so that Target Item was now a plain Text field. In this way, I could just paste in the ID from my foreign database and this solved my problems. I doubt this is intended though. So if I am overlooking something obvious (like why isn't the database a dropdown showing available databases anyhow? :-P) - feel free to drop a comment.
Subscribe to: Post Comments (Atom)
Well, the template seems to be designed for in-database proxying only . Cross database links are still pretty much under cover and intended to be used by power users/developers.
Instead of changing template I use DBBrowser - it also makes database switching easy and fast.
Small quirks aside though, I find the Proxy item/template concept to work far better than the Linked Items implementation of 126.96.36.199. It seems a lot more stable - which I'm quite happy about.
I just found this issue a bit of a curiosity when coming across it. It's a great idea. Something I can even picture my editors could be using eventually, provided I don't have to explain to them how to look up an a GUID and copy/paste it into a textbox ;-)
This little curiosity is indeed the way Proxies work in 188.8.131.52, as described on SDN5:
Notice section 4, Referencing Other Databases, which describes how to change the Template as you have done.
It's true, this is not optimal, but the tree field was provided as a convenience for when proxying to within the Master Database.
Sitecore will most likely provide a better solution in a later release.
Post a Comment