1. Hugh (cheesegrits) here. Thank you for all the good wishes. My back surgery was a success, post-op recovery is going well, and I'm getting stronger and feeling better every day. I hope to be getting back in the saddle and working support again over the next few days.
  2. IMPORTANT NOTE - we have made some changes in our github branch naming. The 'master' branch no longer exists, and is now called 'joomla25' (which is Fabrik 3.0). The 'joomla3' branch (which is Fabrik 3.2) remains unchanged. We have also removed all the other testing branches which had accuulated over the last few years. I have posted a thread in the Community forum for 3.0 with some more information, feel free to as questions there.

show/hide filters block

Discussion in 'Community' started by ErnstJan, Apr 13, 2012.

  1. ErnstJan Member

    Level: Community

    I found a usefull thread from Keroman about this, but I got one question left. He says:

    "Then, included in the template the code for a link or a button to toggle the filters block:

    PHP Code:
    <a id="toggle">link Text</a>

    Where do I have to put this code? Which php-file of the template?

    Just let me know.

    Kind regards, ErnstJan
  2. Jaanus Active Member

    Level: Community
    Can you also post the link?
    I did something similar for me. Just internesting whether the solution that you mentioned is somehow better.
  3. ErnstJan Member

    Level: Community
  4. Jaanus Active Member

    Level: Community
    Shortly after javascript code, I think.
    Like I did. My version of the code is slightly different, but makes the necessary work:

    <script type="text/javascript">
    function toggle_visibility(id) {
    var filter = document.getElementById(id);
    if(filter.style.display == 'none')
    filter.style.display = 'block';
    filter.style.display = 'none';
    <p style="font-weight:bold;"><a href="#" onclick="toggle_visibility('filtertable');">SEARCH(show/hide)</a></p>
    where filtertable is the first word of class name of the html table where the filter fields are placed. The toggle link shows or hides this table.
  5. ErnstJan Member

    Level: Community
    show or hide filters block

    Hello Jaanus,

    I tried yours without succes. After that I added code Keroman in file default_filter.php
    It does show or hide filters block:

    <script language="javascript" type="text/javascript">
    window.addEvent('domready',function() {
    var myFx = new Fx.Slide($$('.fabrikFilterContainer')[0]);

    $('toggle').addEvent('click', function(e){
    e = new Event(e);
    <a id="toggle">Show or hide filters</a>

    but moving over link it doesn't show a "hand" like in link "Export to CSV" (moving over with mouse) Any idea why? I also want to show little icon "search" before text. How to do that?
    Just let me know.

    Kind regards and thanks for taking time, ErnstJan

    Kind regards, ErnstJan

Share This Page