Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David 27 posts 127 karma points
    May 20, 2019 @ 08:08
    David
    0

    Creating a Macro that uses a hyperlink image and text

    Hi all,

    I was wondering about how I would go about creating a Macro where the user would be able to select an image of their choice along with text that would be a hyperlink to a page on the site? I'm quite new to this so would greatly appreciate any help!

    Thank you very much,

    David

  • Markus Johansson 1911 posts 5757 karma points MVP c-trib
    May 20, 2019 @ 20:08
    Markus Johansson
    0

    Hi David!

    You could use some parameters on you macro, did you read the documentation? https://our.umbraco.com/documentation/Reference/Templating/Macros/

    enter image description here

    Just create a macro and add parameters for the things that you want you editors to pick, like image, text and link.

    Then in your view you can get the values of the parameters something like this:

    @Model.MacroParameters["myAlias"]
    

    Hope this points you in the right direction.

Please Sign in or register to post replies

Write your reply to:

Draft