Copied to clipboard

Flag this post as spam?

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


  • Adriano Fabri 383 posts 1280 karma points
    Sep 24, 2014 @ 02:27
    Adriano Fabri
    0

    Problems with RelatedLinks in Umbraco v7.1.6

    Hello,

    I cannot retrieve values from relatedlinks.

    I read these pages and I tried the code, but I receive razor errors:
    - http://our.umbraco.org/documentation/Using-Umbraco/Backoffice-Overview/Property-Editors/Built-in-Property-Editors-v7/Related-Links
    http://our.umbraco.org/forum/developers/razor/48384-Umbraco-V-703-RelatedLinks
    http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/49841-Problems-with-related-links-in-Umbraco-711

    The errors received are:
    - CurrentPage not exist
    - NiceUrl not exist in Umbraco namespace
    - Generic Razor error

    @Model.relatedLinks give me this value:

    [ { "caption": "Google", "link": "http://www.google.it", "newWindow": false, "edit": false, "isInternal": false, "type": "external", "title": "Google" }, { "caption": "Home Page inglese", "link": "1055", "newWindow": false, "internal": "1055", "edit": false, "isInternal": true, "internalName": "en", "type": "internal", "title": "Home Page inglese" } ] 

    Can anyone help me?

    I'm working with Umbraco version 7.1.6 assembly: 1.0.5350.2571

    Thanks for help

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Sep 24, 2014 @ 17:47
    Jeavon Leopold
    100

    Hi Adriano,

    Are you using a legacy MacroScript/Razor Macro? You need to be using this snippet in a MVC View/Partial View or a Partial View Macro.

    Jeavon

  • Adriano Fabri 383 posts 1280 karma points
    Sep 24, 2014 @ 23:55
    Adriano Fabri
    0

    This is my first time with MVC

    I'm using a MacroScript/Razor Macro (HPRelatedLinks.cshtml)...I never used the MVC View/Partial View or a Partial Macro.

    I think it's time to do it :-)

    Thank you I'll try

    Adriano

     

  • Adriano Fabri 383 posts 1280 karma points
    Sep 30, 2014 @ 01:47
    Adriano Fabri
    0

    Thanks Jeavon,
    i solved with your help.

    I tried with Partial View Macro Files

    Thank you so much

    Adriano 

  • Jeavon Leopold 3008 posts 13221 karma points MVP 7x admin c-trib
    Sep 30, 2014 @ 09:15
    Jeavon Leopold
    0

    That's great! Are you using WebForms templates or MVC then?

  • Adriano Fabri 383 posts 1280 karma points
    Sep 30, 2014 @ 10:53
    Adriano Fabri
    0

    MVC

  • 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