klox7 VIP
Total posts: 914
14 May 2014 12:27

Hi,

how can I achieve for checkboxes in "Advanced search options" (markup template) to have more than 2 divs in row-fluid?

Thanks

Last Modified: 15 May 2014


Sergey
Total posts: 13,748
15 May 2014 06:32

You mean more than 2 columns? You can create custom filter template for the field based on the current checkbox.php.


klox7 VIP
Total posts: 914
15 May 2014 07:46

I'm trying to modify it but how do you change this so it will display 4 spans in div

<?php if($key % 2 == 0):?>
    <div class="row-fluid">
<?php endif;?>

Sergey
Total posts: 13,748
15 May 2014 11:09
<?php
$i = 0;
foreach($this->values as $key => $value) :
    if (!$value->field_value)
        continue;
    $label = $this->_getVal($value->field_value);
    ?>
    <?php if($key % 4 == 0):?>
        <?php if($i > 0):?>
            </div>
        <?php endif;?>
        <div class="row-fluid">
    <?php endif;?>
    <div class="span3">
        <label class="checkbox">
            <input type="checkbox" name="filters[<?php echo $this->key;?>][value][]" value="<?php echo htmlspecialchars($value->field_value);?>" 
                <?php echo (in_array($value->field_value, $default) ? ' checked="checked"' : NULL);?>> 
            <?php echo $label;?>
            <span class="badge"><?php echo ($this->params->get('params.filter_show_number', 1) ? $value->num : NULL);?></span>
        </label>
    </div>
<?php $i++; endforeach; ?>
</div>

klox7 VIP
Total posts: 914
15 May 2014 11:57

Thank you. Works great!

Powered by Cobalt