Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dean 55 posts 98 karma points
    Mar 01, 2012 @ 10:39
    Dean
    0

    Property Editor View and Hive

    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 55 posts 98 karma points
    Mar 02, 2012 @ 07:58
    Dean
    0

    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

  • Braydie 148 posts 346 karma points
    Mar 02, 2012 @ 15:50
    Braydie
    0

    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 55 posts 98 karma points
    Mar 05, 2012 @ 23:49
    Dean
    0

    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.

  • andrew shearer 506 posts 652 karma points
    Mar 07, 2012 @ 23:24
    andrew shearer
    0

    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 Sign in or register to post replies

Write your reply to:

Draft