• Resolved distantangel

    (@distantangel)


    I’m using a template I’ve created for mla_gallery that has the following in Open:

    <h3 id='gallery_results_summary'>Found [+found_rows+] images tagged with "[+request:tax_input.attachment_tag,str_replace(',','" / "')+]" (match  [+request:tax_logic,str_replace({'AND' 'OR'}, {'all' 'any'})+] tags)</h3>

    The idea is that it will display the selected search tags (request:tax_input.attachment_tag) and logic (request:tax_logic), and the number of results.

    The tax_logic is chosen from a simple HTML <select> with two options – “Match all tags” (value: AND) and “Match any tags” (value: OR).

    Annoyingly, though, it outputs the following:

    Found 38 images tagged with "tag1" / "tag2" / "tag3" (match [+request:tax_logic,str_replace({'AND' 'OR'}, {'all' 'any'})+] tags)

    Have I missed something? Is there something I’m not doing right? Or is this a legit bug?

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

    (@dglingren)

    Thanks for your report and for including the full text of your template section; very helpful.

    You have uncovered an MLA defect in the handling of brackets and braces when this format code appears in a Custom Markup Template.

    I have uploaded a new MLA Development Version dated 20240530 that includes the fix. You can find step-by-step instructions for using the Development Version in this earlier topic:

    How to download & install the current development version of MLA

    Once the Development Version is installed you can retest the handling of str_replace() array arguments in your markup template.

    The enhancement will be part of my next MLA version, but in the interim it would be great if you could install the Development Version and let me know how it works for you. Thanks for alerting me to this MLA defect.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA v3.18, which contains the fix for this topic. I assume it’s working for you.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the handling of str_replace() array arguments in your markup template. Thanks for your interest in the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.