Copied to clipboard

Flag this post as spam?

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


  • Alex Slabukh 17 posts 77 karma points
    Mar 24, 2014 @ 18:09
    Alex Slabukh
    0

    Could not find property after adding it to document type

    Hey everyone, good morning! 

    I'm created new property in tab generic properties of document type

    And save changes.

    In scripting files I am trying to get value from new property like:
    var externalUrl = menuItem.GetPropertyValueOrName<BasePage>(p => p.externalUrl);

    And I have some exception (looks like property was not added). But in content section, in pages - property exists. When I trying to save new line of code
    var externalUrl = menuItem.GetPropertyValueOrName<BasePage>(p => p.externalUrl);
    in script I have error:  

    'DocumentTypes.BasePage' does not contain a definition for 'ExternalUrl' and no extension method 'ExternalUrl' accepting a first argument of type 'DocumentTypes.BasePage' could be found (are you missing a using directive or an assembly reference?)


  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 24, 2014 @ 18:18
    Jan Skovgaard
    0

    Hi ansi_str

    What version of Umbraco are you using? Runway may not be supported in the version you're using if it's 4.11.x or greater.

    Looking forward to hearing from you.

    /Jan

  • Alex Slabukh 17 posts 77 karma points
    Mar 24, 2014 @ 18:21
    Alex Slabukh
    0

    Hi, Jan

    I'm using umbraco v 4.11.6 (Assembly version: 1.0.4834.19775 )

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 24, 2014 @ 18:32
    Jan Skovgaard
    0

    Hi Ansi

    Ok, then I'm afraid the runway package does not work anymore since a lot has happened under the hood since that package was created.

    Is there any specific reason why you're using that version?

    Otherwise I'll recommend that you have a look at the Standard website MVC package instead. Make sure you download the correct version for 4.11, which is version 1.1.

    /Jan

  • Alex Slabukh 17 posts 77 karma points
    Mar 25, 2014 @ 04:12
    Alex Slabukh
    0

    We have this version of umbraco historically on staging and production servers.
     
    I'm trying add external link in the top menu
    Menu generated in razor script by reading existing property of document type. I thinking, that can add new property inside current document type and get it value in razor code. Jan, after yours comment i understood that it's impossible for current version of umbraco.Thanks.

    But, how can I  add external url?

Please Sign in or register to post replies

Write your reply to:

Draft