I'm testing out Umbraco to use as a possible alternative to my companies
current CMS system and am building some example controls to compare how
easy/difficult things will be.
In one of my controls I'd like to get the URL for published documents I'm
pulling from the database and use the URL to display a link to the document
along with their details.
I can get the property data fine but am struggling to find how to get the
documents URL as displayed in the back end as "Link To Document".
Is there an easy way to do this? I've seen the cmsContentXml table has a
path in the XML but it's made up of IDs rather than an actual text URL.
No problem, let us know if you have anymore questions.
Might be useful to post what you're looking for in an CMS, or describe what your existing CMS does and people can offer their opinion?
There's so much that can be achieved in Umbraco with or without writing .NET, but it's great to know that Umbraco can always be extended using .NET if needed.
Also if you're coming from the .NET world then you're going to love Razor in Umbraco too.
Get "Link To Document" from database?
Hi folks,
I'm testing out Umbraco to use as a possible alternative to my companies current CMS system and am building some example controls to compare how easy/difficult things will be.
In one of my controls I'd like to get the URL for published documents I'm pulling from the database and use the URL to display a link to the document along with their details.
I can get the property data fine but am struggling to find how to get the documents URL as displayed in the back end as "Link To Document".
Is there an easy way to do this? I've seen the cmsContentXml table has a path in the XML but it's made up of IDs rather than an actual text URL.
Thanks
Raymond
Hey Ramond,
In your usercontrol you should just need to call
umbraco.library:NiceUrl(nodeid)
Rich
Hey Ramond,
Just re-read your post, are you trying to read directly from the Umbraco database?
Maybe I mis-understood, but if so, there's no need, that's what the Umbraco API is for http://our.umbraco.org/wiki/reference/api-cheatsheet
Rich
Brilliant thanks Rich, that worked a treat! Hadn't seen the API stuff in my rush to start coding!
Cheers
Raymond
No problem, let us know if you have anymore questions.
Might be useful to post what you're looking for in an CMS, or describe what your existing CMS does and people can offer their opinion?
There's so much that can be achieved in Umbraco with or without writing .NET, but it's great to know that Umbraco can always be extended using .NET if needed.
Also if you're coming from the .NET world then you're going to love Razor in Umbraco too.
Best of luck
Rich
is working on a reply...