I need to extand UrlProperty (CMS 12) to be able choose also Block (ContentReference). It should be localized between Page and Media options. I need it to navigate to specific section (in this case block) on the page and editor can choose which block on his own. I know that I should use EditorDescriptor and modify metadata. But all solutions I've found in forum are involved only CMS11 end extending the HyperLinkProperty (https://world.optimizely.com/blogs/Anders-Hattestad/Dates/2015/2/extending-the-hyperlink-with-custom-field/) not Url. Maybe somebody's done something like this and can help me?
What's the use case for this? Blocks do not have URLs, so adding a way to select a block in a Url property doesn't really make sense.
If you're hoping to link to a Url to show a block's content, you need to add the block to a page's ContentArea (or render it on the page in a similar fashion), then link to the page with the Url property.
Thanks for answer Chris. Yes, I know it. I will built the URL in the backand using chosen block ID as an anchor. My team want to select block (shared block) from Assets Panel by the same Url property. We can navigate to this block (for example automatically scroll down to this section/block). It will be more intuitive for content editor to choose it in the same Url selector instead of new property. I have done sth like this:
But the problem is: this code override all LinkItem/LinkItemCollection/Url properties (HyperLink is everything inside this Dialog). Is it possible to limit properties where I want to override links inside? I've tried to do it by UIHint but maybe in wrong way. Do you know how to do it?