• Resolved ernstwg

    (@ernstwg)


    I ‘ve used this piece of html shortcode stuff. Functionally it works, which is great.

    <form id="mla-search-form" action="." method="post"> <input id="mla-search-box" name="search-string" type="text" value="">&nbsp;<input id="submit" name="submit" type="submit" value="OK"> </form> [mla_gallery s="{+template:({+request:search-string+}|a-bad-term)+}" posts_per_page=10 mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}?search-string={+request:search-string+}"] [mla_gallery columns=3 size=full s="{+template:({+request:search-string+}|a-bad-term)+}" mla_caption="{+description+}" posts_per_page=10]

    Entering a term like “Prometheus” into the search field, the search will be executed and then the focus jums to the top of the page. Can I make it somehow that the focus will be set to an anchor like “#BAUSTELLE_Hinweis_zu_Bildkommentaren”

    Cheers

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter ernstwg

    (@ernstwg)

    I have another question regarding the user experience. The coding in the example above is for all pictures in the media library as the overall image pool or source. How is the coding if I want to apply the search only on the images in the posting as the pool.

    Do you want me to open an own topic for this?

    Cheers

    • This reply was modified 6 years, 7 months ago by ernstwg.
    Plugin Author David Lingren

    (@dglingren)

    Thanks for your questions.

    You wrote “Can I make it somehow that the focus will be set to an anchor…” You can try changing the action="." attribute to the URL of the current post/page with the anchor appended to it.

    You wrote “How is the coding if I want to apply the search only on the images in the posting as the pool.” I assume that “images in the posting” means you want to restrict the search to images “attached” to the current post/page. You can add any of the data selection parameters to the s= keyword search parameter, so try adding post_parent=current to your shortcode parameters. Don’t forget to change both of the shortcodes.

    I am on the road and away from my development system so I can’t test these suggestions. If you have any problems or further questions regarding the above suggestions please post an update here and I will investigate further when I return home next week. Thanks for your patience.

    Thread Starter ernstwg

    (@ernstwg)

    The anchor question works fine. Simple and easy. Thanks.
    The “post_parent=current” advice I need to play with. Will give you another reply.

    Thread Starter ernstwg

    (@ernstwg)

    David, good morning.

    With respect to post_parent=current I can’t get it. I gave it several tries, but I am a “wannabe” :), Your guidance is really appreciated.

    Current coding
    <form id="mla-search-form" action=".#Bildkommentare" method="post"> <input id="mla-search-box" name="search-string" type="text" value="">&nbsp;<input id="submit" name="submit" type="submit" value="OK"> </form>
    [mla_gallery s="{+template:({+request:search-string+}|a-bad-term)+}" posts_per_page=10 mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}?search-string={+request:search-string+}"]
    [mla_gallery columns=1 size=medium s="{+template:({+request:search-string+}|a-bad-term)+}" mla_caption="{+description+}" posts_per_page=100]

    Thread Starter ernstwg

    (@ernstwg)

    I could make it :). Thanks.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your patience while I traveled and for all of your updates. I hope the most recent updates means you have found a solution that works for your application. Let me know if you need more help with this topic.

    Thread Starter ernstwg

    (@ernstwg)

    🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Searching for images, user interface’ is closed to new replies.