|
|
Rank: Newbie
Joined: 8/2/2006 Posts: 7
|
Hi I'm putting together some code under an action handler (on the publish event) that saves data to a sql database for searching against.
I can save all of my own document attributes (title, bodytext etc) but I can't see how to record the page URL.
I thought that I could either use the umbraco objects to extract the URL and store it as a string or grab the node id and then render this when the results are returned as the URL.
Either way I am struggling to find my way around the umbraco API library.
Any help appreciated.
Colin
p.s. as there is so little documentation on umbraco, is this the sort of thing you can learn on the Umbraco developer course???
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,831 Location: MA, USA
|
I don't have an answer for you re: action handlers... but for searching, why not use XSLTsearch ( http://umbraco.percpientstudios.com/xsltsearch.aspx) or the Lucene-based search in the umbraco utilities? It seems a waste to duplicate so much data just for searching. cheers, doug.
MVP 2007-2009 - Percipient Studios
|
|
Rank: Newbie
Joined: 8/2/2006 Posts: 7
|
Hi Doug
Thanks for your post. We are actually replacing your xslt search which stood us in good stead and was very quick. However the data needs to be shared with other systems and so we are storing it externally from Umbraco plus we're better with c# and sql than we are with XSLT! - or so I thought :!:
Cheers
Colin
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 811 Location: Århus, Denmark
|
Well... If you have the ID of the node, then you should be able to get the url by using umbraco.library.NiceUrl() The same method that you would use in an xslt navigation...
|
|
Rank: Newbie
Joined: 8/2/2006 Posts: 7
|
thanks Morten - you are absolutely right and this is what we did in the end.
We didn't have all of our libraries referenced properly which lead us to not getting the library calls to work properly - school boy error!
Thanks
Colin
|
|
|
Guest |