Try our conversational search powered by Generative AI!

Disable the Filed in LinkItem collection

Vote:
 

Hi,

I created one page with LinkItem collection property.How to disable the fileds in link item collection property,that means,

once i use the link means,second time shoul not to allow..how to restrict that?

  

#142592
Dec 15, 2015 12:21
Vote:
 

I think I understand what you're after and it's not supported in any nice fashion.

I guess one option you have is to hook up to the saved or published events and modify the page type data. In there you would move the LinkItemCollection property to a Tab with other permissions or set the property to visibleineditmode = false. Downsite is that it would then disapper from the All properties view and you would need to not output editattributes for it in the template. It would also be hard to control on startup when models sync.

You also have the option of setting permissions to only allow Create but not Edit a page or maybe only allowing onpage editing for the group in question.

There might also be an option where you include some of your own javascript in edit mode where you find and try to disable the control.

#142609
Dec 16, 2015 8:41
Vote:
 

Hi Johan Kronberg,

I would like to disable the links after adding a link in linkItem collection property(It should allow single link instead of multiple link). I want to restrict multiple links.

Could you suggest me proceed further.

#142622
Dec 16, 2015 11:15
Vote:
 

OK, from that input maybe you should just create a local block that contains Url, LinkText and Target properties instead of using a LinkItemCollection.

#142628
Dec 16, 2015 15:13
Vote:
 

I think Johans suggestion is probably the easiest one. But maybe you could do a custom validation attribute to limit the numer of links to one.

#142716
Dec 20, 2015 10:45
Vote:
 

Thanks for all your reply. I have done the local block with Title,target,link properties and also the validation..

Is there any way button to save only the Title with link.

#142721
Dec 21, 2015 10:26
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.