Copied to clipboard

Flag this post as spam?

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


  • Robert 4 posts 24 karma points
    May 22, 2012 @ 00:38
    Robert
    0

    Umbraco.GetContentById - How to load "stuff" other than content?

    I'd like to load stuff other than content in my macro. I'm very new to Umbraco but I've managed to create my own Hive provider from which I'd like to load content. As a start I first tried to load a template using the Umbraco.GetContentById helper but it seems this helper only accepts "content://" URIs.

    How can I load stuff like "storage://" or "mycustomhive://"?

  • Robert 4 posts 24 karma points
    May 22, 2012 @ 00:42
    Robert
    0

    Editing the post didn't work, but  I forgot to mention that the "mycustomhive://" uri-pattern is already registered in a config file and showing up in a custom section in my Umbraco backoffice using a custom tree provider, so this already "works"

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    May 22, 2012 @ 12:05
    Jeroen Breuer
    0

    I think you can use some the examples which are here: http://our.umbraco.org/documentation/v501/Reference/Templating/Umbraco-Helpers/

    Jeroen

  • Robert 4 posts 24 karma points
    May 22, 2012 @ 12:47
    Robert
    0

    @Jeroen: As stated the helper only works when I pass a URI like: "content://p__nhibernate/v__guid/00000000000000000000000000001048". If I pass a URI which is provided by a different HiveProvider like the I.O. provider which provides "storage://xxx" or preferrably my custom HiveProvider which provides "mycustomhive://xxx" data an error is thrown: "Parameter 'other' must be of type Guid to convert to a Guid CLR type, but it is 'Uri', with value: xxx"

Please Sign in or register to post replies

Write your reply to:

Draft