I want to add a "filter by tags" feature to mixitup in Joomla.

I need a list of tags for specified category articles and later for each item to add titles of tags for each item.

There was a "filtering options" in blog display mode, but now I cannot find it. So I have filtering option by categories, but some articles need a many-to-one relationship; I think Jtags can be used effectively. I didn't find any similar solutions, without preseting tags with dynamic display.

$category = $categories->get($this->category->id);
$allCategories = $category->getChildren();
<ul id="filters" class="btn-group">
  <li><a class="filter active btn btn-info" data-filter="all"><?php echo JText::_('TPL_COM_CONTENT_GRID_FILTER_SHOW_ALL'); ?></a></li>
  <?php foreach ($allCategories as $key => $value) : ?>
      <li><a class="filter btn btn-info" data-filter="<?php echo $value->alias; ?>"><?php echo $value->title; ?></a></li>
  <?php endforeach; ?>

<li class="grid-item mix mix_all grid <?php echo $item_hover_style; ?>
    <?php if($this->params->get('show_filter') && count($allCategories))
        echo $item->category_alias; ?>"
    <?php if($this->params->get('show_sort'))
        echo ' data-date="'.JHtml::_('date', $this->item->publish_up, 'YmdHis').'" data-name="'.$this->item->title.'" data-popularity="'.$this->item->hits.'"'; ?>>

So when you click a tag, jquery.mixitup will hide unwanted items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.