• Resolved jhdean

    (@jhdean)


    Hi David

    I have been searching and haven’t found the answer.

    I want to display the contents of a custom field in a gallery content template:

    {+template:({+detail-page-title+})+}{+template:({+description+}|{+caption+})+}

    When I do this, the second template displays but nothing is shown for the custom field detail-page-title which does have a value. Is it possible to use the custom field? Is there a different formatting necessary?

    I just found I was able to solve my problem using iptc:object-name instead of the intermediary custom field but still wonder about the custom field.

    thanks,
    Jeff

    https://www.ads-software.com/plugins/media-library-assistant/

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Jeff,

    Thanks for the detailed explanation and for including the source text example. Since detail-page-title is a custom field you need to supply a prefix so MLA will know where to find it. You have already found the iptc: prefix; custom: works the same way. Try something like:

    {+template:({+custom:detail-page-title+})+}{+template:({+description+}|{+caption+})+}

    All of the prefix values (and format options) can be found in the Settings/Media Library Assistant Documentation tab. In my latest version (2.02) I have re-organized the coverage of field-level substitution parameters; I hope you find the new information helpful.

    I am marking this topic resolved, but if you have any problems or further questions about adding custom fields to your [mla_gallery] shortcodes please update it. Thanks for your continued interest In the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Using a custom field in a content template’ is closed to new replies.