Copied to clipboard

Flag this post as spam?

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


  • Psib3r 70 posts 119 karma points
    Aug 24, 2012 @ 12:04
    Psib3r
    0

    Content picker

    I have a macro that has a contentpicker on, i would like to get the url from the parameter in the razor script, can this be done?

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 24, 2012 @ 12:11
    Fuji Kusaka
    0

    Can you try doing the following

     

         @{
    var param = @Parameter.source;
          var content = Model.NodeById(@param); 
    foreach(var node in content.Children) {
    @node.Url
    }
    }

     

     

  • Psib3r 70 posts 119 karma points
    Aug 24, 2012 @ 12:47
    Psib3r
    0

    Error loading Razor Script PersonVCard.cshtml
    Cannot instantiate a DynamicNode without an id

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 24, 2012 @ 12:59
    Fuji Kusaka
    0

    Under the Parameter tab for PersonVCard Macro did you add the Alias : source  Name: Content ?

     

    //fuji

  • Psib3r 70 posts 119 karma points
    Aug 24, 2012 @ 14:37
    Psib3r
    0

     

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Aug 29, 2012 @ 14:40
    Fuji Kusaka
    0

    Holy Crap I just realise i completely replied to your threat with a wrong solution.

    With Content Picker try this instead

    @{     var content = @Model.NodeById(Model.conntePicker);
        @content.Url }
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies