• Resolved bhasic

    (@bhasic)


    Hello again,

    I decided to use categories to display galleries of different topics. I don’t understand how to style or give an Id to current active category link in term_list. Here’s my code:

    [mla_term_list taxonomy=attachment_category parent=63 mla_link_href="{+page_url+}?term_slug={+slug+}" mla_rollover_text='\n' mla_output=flat show_count=true separator='  |  ']
    
    [mla_gallery post_parent=all orderby=date order=DESC attachment_category="{+template:({+request:term_slug+}|In English)+}" post_mime_type="image,video" posts_per_page=10 mla_nolink_text="Select a category."]
    
    [mla_gallery post_parent=all attachment_category="{+template:({+request:term_slug+}|In English)+}" posts_per_page=10 mla_output="paginate_links,prev_next" mla_link_href="{+page_url+}?term_slug={+request:term_slug+}" post_mime_type="image,video" mla_style=km mla_markup=km]
Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question, and thanks for including the full text of your shortcodes; very helpful.

    In the current MLA version there is no way to highlight the current active term in an [mla_term_list] shortcode. However, you can achieve something similar by adding the term name to your term list URLs and adding a third [mla_gallery] shortcode to display a gallery heading. Here is a solution working well on my system:

    [mla_term_list taxonomy=attachment_category parent=63 mla_link_href="{+page_url+}?term_slug={+slug+}&current_name={+name,url+}" mla_rollover_text='\n' mla_output=flat show_count=true separator='  |  ']
    
    <h2>[mla_gallery ids=1 mla_nolink_text="{+template:(Items for category {+request:current_name+})+}"]</h2>

    I hope that gives you an alternative solution for your application. I am marking this topic resolved, but please update it if you have problems or further questions regarding the solution outlined above. Thanks for your continued interest in the plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Highlighting active term’ is closed to new replies.