Copied to clipboard

Flag this post as spam?

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


  • Kyle Goulding 30 posts 192 karma points
    Dec 06, 2017 @ 16:15
    Kyle Goulding
    0

    Gallery Macro with Alt Text per image

    Out of the box the Gallery macro uses the file name of the image as the alt text... is there any way you can add a repeatable textbox to add in meaningful alt tags/descriptions for each image?

    Thanks

  • Marcio Goularte 374 posts 1346 karma points
    Dec 06, 2017 @ 17:22
  • Kyle Goulding 30 posts 192 karma points
    Dec 11, 2017 @ 15:50
    Kyle Goulding
    0

    Hi Marcio,

    Thanks for this... I am not sure this is the solution I am after.

    What I think would be best would be simply a text field for each image selected.

    I have been exploring some options using document types as you can add in multiple properties to each, but then this makes the content structure quite messy and I like the idea of a macro as it doesn't add anything to the content tree.

    Thanks

  • Marcio Goularte 374 posts 1346 karma points
    Dec 11, 2017 @ 19:43
    Marcio Goularte
    0

    I understood what you want. You can create a media type with the property you want.

    https://our.umbraco.org/documentation/getting-started/data/Creating-Media/#creating-a-media-type

  • Kyle Goulding 30 posts 192 karma points
    Dec 12, 2017 @ 15:37
    Kyle Goulding
    0

    Hi Marcio,

    Thanks for this - I will have a look and see how I get on.

    I have also been thinking about this in another scenario and the original way I was thinking would have be able to achieve this as well.

    Imagine you wanted to include logos of sponsors and along with their logo you wanted to link the image to the company's website.

    For easy use by the content editor using a macros allows them to insert wherever they like in the RTE and allows the developer to develop the template of the image with the anchor tag and alt within a row and col-sm-3 for example.

    The content editor would just select the image and have a couple of textboxes on the parameters when using the macro.

    I think this would give a massive amount of functionality for multiple scenarios.

    Maybe one for a development. I will let you know how I get on with creating custom media types.

    Thanks

  • Marcio Goularte 374 posts 1346 karma points
    Dec 12, 2017 @ 15:51
    Marcio Goularte
    0

    Another alternative would be to use Stacked Content. You create a razor view and access the properties as IPublishedContent.

    https://our.umbraco.org/projects/backoffice-extensions/stacked-content/

Please Sign in or register to post replies

Write your reply to:

Draft