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?)
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.
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.
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?)
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
Hi, Jan
I'm using umbraco v 4.11.6 (Assembly version: 1.0.4834.19775 )
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
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?
is working on a reply...