Get WebPartID for Widget

Dmitry Bastron asked on October 19, 2016 10:48

Hi all!

Is it possible to show somehow "Web part control ID" field while adding/editing widget?

I mean like with the web part: webpartid

But for the widgets adding dialog I have only: widget

Correct Answer

David te Kloese answered on October 20, 2016 13:49

Since a the anchor link will be visible in the url bar, wouldn't you want them to create more descriptive ones? Since its a best practice for Webpart Control ID's is to keep them as short as possible, I'd say create a separate field so they could create more human readable and SEO friendly anchors?

0 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on October 19, 2016 15:27

Hi,

I'm not aware an easy out of the box way for adding this property.

What would you want to achieve by making it available for editors? Since they might not understand or wrongly use this field.

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on October 20, 2016 13:40

Hi!

I'm developing the anchors feature for the user to be able to scroll down to concrete widget. For this purpose I decided to utilize WebPartID as unique ID on the page. And it would be handy for the editor to open widget properties and see the anchor name.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.