Get Widget Instance properties in text/xml transformation

Naresh Ede asked on April 23, 2018 06:10

Hi Guys

I want to get widget instance properties in text/xml transformation.

Is that possible ?

Thanks

Naresh Ede

Recent Answers


Peter Mogilnitski answered on April 23, 2018 12:22 (last edited on December 10, 2019 02:31)

Widgets are a bit different from web parts in terms of macro resolving.

To get the value of a property of the current web part, use only: {% PropertyFieldName %} {% WebPart.GetValue("WebPartControlID","PropertyFieldName") |(identity)GlobalAdministrator%} - it will easily resolve for current instance. but for widget if we take (static html) I think you need to call MacroResolver.Resolve(Eval("FieldName").ToString()) in the code behind.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on April 25, 2018 14:38

You can normally in the webpart container.

However, I did create a transformable web part that does exactly this, it's on the marketplace, and passes your web part/widget properties into the transformation you set. Very convenient!

0 votesVote for this answer Mark as a Correct answer

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