Dynamic property cache

Vote:
 

Hi,

I need to get a dynamic property from within a custom property type. CurrentPage["dynprop"] just returns null. In CMS 6 it says that the DynamicPropertyTree class is deprecated so I've tried using DynamicPropertyCache however it simply returns null when the value is inherited. So how do I get the value of an inherited dynamic property?

#62612
Oct 30, 2012 16:47
Vote:
 
#62615
Oct 30, 2012 19:49
Vote:
 

You should access it using CurrentPage.Property["dynprop"]

#62616
Oct 30, 2012 20:43
Vote:
 

Anders: Is this a special case? From what I have learned (http://world.episerver.com/Articles/Items/Best-Coding-Practices/) properties are preferrably accessed directly through the indexer property on CurrentPage.

#63059
Nov 08, 2012 12:51
Vote:
 

This

CurrentPage.Property["dynprop"]

is the index property :)

 

#63060
Nov 08, 2012 13:07
Vote:
 

CurrentPage[""] will if the page is writable only return properties that exist on that page.

See section What happens when you access a property in the sdk developer guide.

http://sdk.episerver.com/library/cms6.1/Developers%20Guide/Core%20Features/Properties/Working%20with%20page%20properties.htm

#63064
Nov 08, 2012 13:16
Vote:
 

What are we discussing?

Thought the problem was how to access dynamic properties. That can be done throuht

CurrentPage.Property["dynprop"]

 

 

#63066
Nov 08, 2012 13:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.