• Resolved agenius

    (@agenius)


    I have some code like this and want the initial display to just say “Select from the dropdown to start your search”
    How can I accomplish this?? Thanks!!
    [mla_gallery orderby=date order=asc posts_per_page=10 post_mime_type=application/pdf post_parent=all add_filters_to=pp tax_relation=AND attachment_tag="{+request:a_tag+}" attachment_category="{+request:a_category+}" link=file mla_target="_blank" mla_caption="Title:{+title+} Author: {+caption+} {+description+}" columns=1 mla_nolink_text="Select from dropdown.. Please note that prior to 1967 not every year has 12 issues - " mla_markup="psarchives" my_gallery_title="Archives Articles for {+request:a_category+} {+request:a_tag+}" ]

    • This topic was modified 8 years, 7 months ago by agenius.
Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Good to hear from you again, and thanks for the question.

    You have only posted part of your page content but I can give you a possible solution based on my guess of the other elements on the page. It looks like you have two dropdown controls, one for an attachment_tag and one for an attachment_category. You want the user to select a term from both of these to display items that are assigned to both the selected tag and the selected category. Is that right?

    If so, you can use the technique outlined in the “MLA Term List Examples” section of the Settings/Media Library Assistant Documentation tab. Just add a content template that supplies a default value when no dropdown value is present. For your application, this would be something like:

    [mla_gallery]
    orderby=date 
    order=asc 
    posts_per_page=10 
    post_mime_type=application/pdf 
    post_parent=all 
    add_filters_to=pp 
    tax_relation=AND 
    attachment_tag="{+template:({+request:a_tag+}|no-term-selected)+}"
    attachment_category="{+template:({+request:a_category+}|no-term-selected)+}"
    link=file 
    mla_target="_blank" 
    mla_caption="Title:{+title+} Author: {+caption+} {+description+}" 
    columns=1 
    mla_nolink_text="Select from dropdown.. Please note that prior to 1967 not every year has 12 issues - "
    mla_markup="psarchives"
    my_gallery_title="Archives Articles for {+request:a_category+} {+request:a_tag+}"
    [/mla_gallery]
    

    Note that I am using the alternate “enclosing shortcode” syntax to break the parameters over several lines for readability. Since you are using a custom markup template you might also consider moving some of your parameters to the “Arguments” section of the template. That might simplify maintenance if the template is used in multiple places with the same parameter values.

    I hope the above suggestion meets your needs. I am marking this topic resolved, but please update it if you have any problems or further questions regarding the solution or if I did not understand your goal. Thanks for your continued interest in the plugin.

Viewing 1 replies (of 1 total)

The topic ‘initial display – none’ is closed to new replies.