x First time here? Check out the FAQ
  • Avatar42posts63karma

    Property Editor View and Hive

    Dean started this topic March 1, 2012 @ 10:39

    Hello,

    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.

    Thanks

    Dean


  • Dean posted this reply March 2, 2012 @ 07:58

    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

    Thanks

    Dean


  • Avatar133posts261karma
    Comment with ID: 109734
    Braydie posted this reply March 2, 2012 @ 03:50

    Hi Dean, 

    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


  • Dean posted this reply March 5, 2012 @ 11:49

    Hi Braydie,

    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.

    Thanks alot

    Dean.


  • Avatar251posts323karma
    Comment with ID: 110226
    andrew shearer posted this reply March 7, 2012 @ 11:24

    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........... :(


Please login or Sign up To post replies