Retrieve Link / Button output via macro

Stefan Sturm asked on September 7, 2015 13:22

Hello

ist there a way to get the output from a "Link / Button" webpart via macros?

Regards st.

Update:

I found the solution here: Loading values from the properties of other web parts

{% WebPart.GetValue("WebPartControlID","PropertyFieldName") %}

sloved my problem!

Recent Answers


Brenden Kehren answered on September 7, 2015 13:28

What would the output of the button be? The button text? The actual button click event or possibly the url the button navigates to when clicked? There really is no output of the button so I'm a bit confused.

0 votesVote for this answer Mark as a Correct answer

Stefan Sturm answered on September 7, 2015 13:32 (last edited on September 7, 2015 13:38)

Ok so lets say i need the LinkText, Link CSS class and the Link URL.

With output i mean the HTML markup.

0 votesVote for this answer Mark as a Correct answer

Maarten van den Hooven answered on September 7, 2015 13:45

What you could do is fill the LinkText, Link CSS class and the Link URL with Macro's (https://docs.kentico.com/display/K8/Entering+macro+expressions), but the other way around is not possible out of the box (I think). But you could create an custom macro that has as parameter the webpart ID and the field name where you want the value from.

0 votesVote for this answer Mark as a Correct answer

Stefan Sturm answered on September 7, 2015 15:34

I made an update on my question! Thanks for your time!

0 votesVote for this answer Mark as a Correct answer

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