Press Ctrl / CMD + C to copy this to your clipboard.
I have a HiveId that I would like to get the content for. I'm in the context of a property editor view.
How can I do something like @Umbraco.GetContentById(hiveId)
I can't seem to get access to the UmbracoHelper class from the view.
I have a
@using Umbraco.Cms.Web; at the top of my editor view.
Is there some way of getting access to this functionality?
I have tried instantiating a HiveManager or something like that but that confuses me even more with the parameters required.
Much appreciate any assistance.
Please can someone shed some light on how to go about this issue. I'm really stuck. I would like to query the content hive either in the razor view of a property editor, or if possible query the hive from a controller that services the property editor view. I really need some help on these issues
I had a similar issue and posted this, and Anthony Dang was trying to do the same here. I'm not sure if you'll get a definitve answer from the posts, but it should point you in the right direction.
Hope this helps
Thanks for the links. It looks like lots of people are struggling with the same types of things, it does sound like they are working on a nicer/easier way to do this type of thing in future releases.
In the mean time I went with adding values to the ViewBag, although I'd much prefer a stronger typed way of doing it.
im guessing there's no unit test in the umbraco 5 core that would've picked up on @Umbraco.GetContentById and @Umbraco.GetDynamicContentById not working in the RTM........... :(
Write your reply to:
Image will be uploaded when post is submitted