This is probably something so easy, which is why I can't manage to find it in the forum anywhere. I am using the content picker for a button on my macro and the end goal is for the user to just pick the page in the document tree and have the href tag link to that Url. I've tried a slew of things and have not gotten anywhere.
Hi Amir, thanks for the reply! The proposed solution did not render either, in fact it actually is shown with an error. The way I had it didn't render an error but didn't link properly. As far as the other parameters, those are working fine
Grab a URL from content picker
This is probably something so easy, which is why I can't manage to find it in the forum anywhere. I am using the content picker for a button on my macro and the end goal is for the user to just pick the page in the document tree and have the href tag link to that Url. I've tried a slew of things and have not gotten anywhere.
Here is my code:
Any idea what the issue could be? 'ServiceUrl' is the alias for the parameter I have given the content picker.
Hi Mike!
It will likely be something like below, CurrentPage refers to the context of the current page, not the macro's context.
Are the other two parameters rendering properly?
Learn More
Hope this helps,
Amir
Hi Amir, thanks for the reply! The proposed solution did not render either, in fact it actually is shown with an error. The way I had it didn't render an error but didn't link properly. As far as the other parameters, those are working fine
What's the error?
And sorry, it might be Umbraco.Content() Umbraco.TypedContent(), not UmbracoNiceUrl()
Alright, if you're using the new content picker here's how you do it, reference here: https://our.umbraco.org/forum/templates-partial-views-and-macros/85768-new-content-picker-as-macro-parameter-v761
See below, just tested this::
Genius. Thanks!
is working on a reply...