• Resolved jejela19

    (@jejela19)


    Hi david,

    I would like to ask you a question about paginating my galleries in att. categories and [mla_tag_cloud].
    so here’s the thing, I want my att.categories to get paginated and also my att.tag at [mla_tag_cloud]

    This is my code
    `<form id=”mla-text-form” action=”.” method=”post” class=”row”>
    Att. Categories
    [mla_term_list taxonomy=attachment_category mla_output=dropdown mla_option_value=”{+slug+}” show_count=true pad_counts=false ]

    <input id=”text-form-submit” name=”text_form_submit” type=”submit” value=”Search” />
    </form>

    <h3>Gallery</h3>

    [mla_tag_cloud]
    taxonomy=attachment_tag
    mla_link_href=”[+page_url+]?current_id={+term_id+}”
    number=0 smallest=12 largest=12 separator=’ / ‘
    [/mla_tag_cloud]

    [mla_gallery]
    attachment_category=”{+template:({+request:tax_input.attachment_category+}|no-term-selected)+}”
    tax_query= “{+template:(array \\( 0 => array \\( ‘taxonomy’ => ‘attachment_tag’, ‘field’ => ‘id’, ‘terms’ => array\\( {+request:current_id+} \\) \\) \\))+}”

    post_parent=all
    mla_caption=”{+image_alt+}”
    columns=3 posts_per_page=4 size=full link=file
    mla_link_class=”nav-links”

    [/mla_gallery]

    [mla_gallery]
    attachment_category=”{+template:({+request:tax_input.attachment_category+}|no-term-selected)+}”
    mla_output=”paginate_links,prev_next”
    mla_link_class=”nav-links”
    tax_query= “{+template:(array \\( 0 => array \\( ‘taxonomy’ => ‘attachment_tag’, ‘field’ => ‘id’, ‘terms’ => array\\( {+request:current_id+} \\) \\) \\))+}”
    post_parent=all
    columns=3 posts_per_page=4 size=full link=file
    mla_link_href=”[+page_url+]?&tax_input[attachment_category]={+query:attachment_category,url+}”
    [/mla_gallery]

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

    (@dglingren)

    Thanks for your question and for including the source text of your form and shortcodes; very helpful. I want to make sure I understand your application logic.

    Your first shortdode is an [mla_term_list] that creates a dropdown control for selecting one Att. Categories term. I am not sure what it means to “paginate” a dropdown control; is that your intent? I think it will work but I want to make sure you want a set of pagination links to filter the content of the dropdown control.

    Your tag cloud can be paginated along the lines described in the “Tag Cloud Pagination Example” section of the Settings/Media Library Assistant Documentation tab; have you tried applying that example to your application?

    Your [mla_gallery] shortcodes include a simple taxonomy query for the attachment_category filter and a tax_query parameter for the attachment_tag filter. When a tax_query is present the simple taxonomy query will be ignored. You can either add the attachment_category to the tax_query or convert the tax_query to a simple taxonomy query. I can give examples of both solutions, but I need to know how to combine the filters. Do you want to display only items that satisfy both filters or do you want items that have the selected Att. Category or the Att. Tag?

    Finally, combining the two shortcodes is problematic. The [mla_term_list] adds values to the form when the “Search” button is clicked. The [mla_tag_cloud] generates hyperlinks for each term that adds a value to each hyperlink. When you click “Search” there’s no way to add a tag, and when you click on a cloud link there’s no way to add a category.

    The usual way to implement two filters is to use two [mla_term_list] shortcodes in one HTML form. You can use dropdown controls to select one category/tag or checklists to select multiple categories/tags. If you want to paginate the terms a checklist might be best, but it’s up to you. Would you like to see this approach?

    I will leave this topic unresolved until I hear back from you. The answers to my questions and any additional details you can provide will be helpful. Thanks!

    Thread Starter jejela19

    (@jejela19)

    Hi David,

    I have found another solution on your examples, Thank you for your response. and by the way I have another questions. First, how do I put placeholder on the [muie_terms_search] input box. Second, how do I put tags indicator on the picture when I click it. Example: When I clicked the photo it will show what multiple tags I put on it.

    This plugin is great and also it’s a powerful one thank you.

    Thread Starter jejela19

    (@jejela19)

    Hi David,

    I’m sorry for having a lot of questions. I have another question to ask you and I am willing to wait for your reply. I am completely newbie in WordPress and I want to learn how to do custom field mapping and iptc/exif mapping with your plugin. is it possible to do that mapping on Forminator plugin? if yes could you give me an example? like for example I have a text field for taxonomies tags/category and image uploader in a form, I want them to show on the media library with taxonomies on it after clicking submit. if it’s not possible the WordPress File Uploader is fine I read a lot of it in this plugin topic but I don’t know how to use it.

    Thank you again, waiting for your reply.

    Thread Starter jejela19

    (@jejela19)

    Thank you for this great plugin David, you can mark this topic as resolve.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your updates with the news of your progress and the additional questions.

    You asked “First, how do I put placeholder on the [muie_terms_search] input box.” I have added a new muie_attributes= parameter to the MUIE terms search and keyword search shortcodes. The updated Documentation says:

    You can use the muie_attributes parameter to replace the default type=text and/or size=20 attributes or to add attributes such as placeholder=”Enter some terms”. separate multiple attributes with spaces and quote any value containing spaces.

    So, add a parameter like muie_attributes='placeholder="Enter some terms" ' to your shortcode.

    You asked “Second, how do I put tags indicator on the picture when I click it.” You can add Att. Tags terms to your gallery display in a couple of ways. The most flexible method is to create a custom markup template and change the HTML for each gallery item. The simple way is to add one or two parameters to your [mla_gallery] shortcode. Here’s an example that adds the term(s) in the caption and in the rollover/hover text:

    [mla_gallery]
    mla_rollover_text="{+template:(Tags: {+terms:attachment_tag+})+}"
    mla_caption="{+template:{+caption+}(<br />Tags: {+terms:attachment_tag+})+}"
    [/mla_gallery]
    

    You wrote “ I want to learn how to do custom field mapping and iptc/exif mapping with your plugin.” I will address this question and the issues you are having in the related topic you started: IPTC/EXIF Mapping won’t auto execute upon upload.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the answers I gave above.

    Thread Starter jejela19

    (@jejela19)

    Hi David,

    you wrote this code ` [mla_gallery]
    mla_rollover_text=”{+template:(Tags: {+terms:attachment_tag+})+}”
    mla_caption=”{+template:{+caption+}(<br />Tags: {+terms:attachment_tag+})+}”
    [/mla_gallery] ` can i use this in a lightbox? like in the photonic plugin.

    Thank you again.

    • This reply was modified 2 years, 9 months ago by jejela19.
    Plugin Author David Lingren

    (@dglingren)

    When you use MLA’s support for the Photonic Plugin MLA performs the data selection portion of the task and hands an ids= list of the selected items to Photonic, which composes the gallery display. MLA does not have any part of the gallery composition process and MLA parameters such as mla_caption= are not recognized by Photonic. You are limited to whatever the Photonic plugin makes available. This also applies to any other gallery or l;ightbox plugin you activate through MLA’s “Support for Other Gallery-generating Plugins”. You are limited to whatever formatting features they offer.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to paginate 2 separate gallery’ is closed to new replies.