Copied to clipboard

Flag this post as spam?

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


  • Martin 18 posts 73 karma points
    Jun 08, 2012 @ 14:09
    Martin
    0

    New to Razor ( non programmer editing)

    Hi folks!

     

    i am tryin to get ublogsy to pull information from the original landing page into another page, where i have an variant of the script, ( as this is for a mobile version).

     

    i have everything working as expected exept one thing! i need to add nodeid from a field on the contentnode due to 2 language capabilities, so instead of hardcoding a node id like this:

     IEnumerable<DynamicNode> postList = uBlogsy.Web.Helpers.NodeHelper.GetPosts(1223); 

     

    i am tryin to get this id from a field on the documenttype - content node.

    the problem is that this comes out as a string and the GetPosts thingy seems to want int.

    i tried playing around with the AsInt() thingy but, no luck...

    any, programmer able to help me out here ?

    what ive tried is to made the @Model.Fieldname into a variable, and putting it instead of the hardcoded getposts id.

     

  • Martin 18 posts 73 karma points
    Jun 08, 2012 @ 14:25
    Martin
    0

    yay fixed, it i think...

    var mynode = @Model.ContentNode;

        IEnumerable<DynamicNode> postList = uBlogsy.Web.Helpers.NodeHelper.GetPosts(int.Parse(mynode));

     

Please Sign in or register to post replies

Write your reply to:

Draft