ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

adding tags to grid and showing results by tags?

December 14, 2014 1:50pm

Subscribe [1]
  • #1 / Dec 14, 2014 1:50pm

    Riverboy's avatar

    Riverboy

    2993 posts

    Hello.

    I just cant find any solution for image grids that could have unique tags per row what are listed in result page instead of channel entries.

    Does anyone have this type of settings what actually works?

    I try to make image gallery with tags per image (using text input x 4 = 4 “tags”)
    I cant find any other solution but even with this, result page is totally beyond my understanding, on how I could show only that image what has the tag, instead of all images on channel entry.

    So when I put image1.jpg with tags like “foo” “bar”, what should the actual search result page should be like?

    Solspace Tag is not compatible with grid, and I havent found any add on that could be used with grid, so this is total pain to create image gallery with clickable tags and showing only images that actually has the same tag instead of all images within channel entry :/

    Can someone please help a bit with this, anyone?
    Thanks.

    Below is the “tag” part from my not-so-nice looking solution that shows those tags per grid row but I have no idea how the result page should be done to show only images that meets the keyword clicked.

    {my-gallery}
    
    {exp:search:simple_form search_in="everywhere" where="all" channel="mediabank" result_page="gallery/results"}
                                                              <input type="hidden" name="keywords" id="keywords" value="{gallery:keyword_1}" size="18" maxlength="100">
                                                              <input type="submit" value="{gallery:keyword_1}" class="btn btn-link">
    {/exp:search:simple_form}
    
    {exp:search:simple_form search_in="everywhere" where="all" channel="mediabank" result_page="gallery/results"}
                                                              <input type="hidden" name="keywords" id="keywords" value="{gallery:keyword_2}" size="18" maxlength="100">
                                                              <input type="submit" value="{gallery:keyword_2}" class="btn btn-link">
    {/exp:search:simple_form}
    {exp:search:simple_form search_in="everywhere" where="all" channel="mediabank" result_page="gallery/results"}
                                                              <input type="hidden" name="keywords" id="keywords" value="{gallery:keyword_3}" size="18" maxlength="100">
                                                              <input type="submit" value="{gallery:keyword_3}" class="btn btn-link">
    {/exp:search:simple_form}
    {exp:search:simple_form search_in="everywhere" where="all" channel="mediabank" result_page="gallery/results"}
                                                              <input type="hidden" name="keywords" id="keywords" value="{gallery:keyword_4}" size="18" maxlength="100">
                                                              <input type="submit" value="{gallery:keyword_4}" class="btn btn-link">
    {/exp:search:simple_form}
    {/my-gallery}
  • #2 / Dec 15, 2014 6:02am

    Riverboy's avatar

    Riverboy

    2993 posts

    I found semi solution to this and its even simple than using regular search, thank god 😊

    In the channel entry page, or category page, where I show all image thumbs, I just put a link with keyword_1, keyword_2 etc. like this:

    <a href="http://{path=mediabank/filtered}/{gallery:keyword_1}">{gallery:keyword_1}</a>

    and on the opening grid tag in the template named as “filtered” I have this:

    {gallery search:keyword_1="={segment_3}"}

    Now I just have to think how I could use the same template for to use with all 4 “tags” to filter out images without having to use 4 different filter-templates.

    ideas how that could be done with some OR or similar?

     

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases