A generic filter for contao entities.

Overview

Contao filter bundle

Build Status Coverage Status

This bundle offers a generic filter module to use with arbitrary contao entities containing standard filter with initial filters and filter form types including symfony form type representations.

Features

  • codefog/tags-bundle integration
  • heimrichhannot/contao-categories-bundle integration
  • Form handling using symfony form component
  • Form rendering by using symfony form templates (currently available: bootstrap 3, bootstrap 4, foundation, div, table)
  • Numerous symfony form types supported (see: http://symfony.com/doc/3.4/reference/forms/types.html)
  • Highly customizable and detached from tl_module table
  • Label/Message handling using symfony translations
  • Render form always empty (without user selection)
  • Merge data over multiple filter forms with same form name
  • Default Values (can be overwritten by user)
  • Initial Values (can`t be overwritten by user)
  • Stores filter data in session (no GET parameter URL remnant)
  • Content element "Filter-Preselect" with optional redirect functionality to preselect filter on given page
  • Content element "Filter-Hyperlink" with filter preselect feature

Usage

Install

  1. Install with composer or contao manager

    composer require heimrichhannot/contao-filter-bundle
    
  2. Update database

We recommend to use this bundle toghether with List Bundle and Reader Bundle.

Setup

  1. Create a filter configuration within System -> Filter & sort configuration
  2. Add filter elements to the filter config.
  3. If you want to show the filter somewhere (for example to filter a list), create a filter/sort frontend module.

Wrapper elements (DateRange, ProximitySearch, ...)

The Wrapper element has to be places before the fields associated with them. For example the date_range wrapper element needs to be placed before the two associated date fields.

Preselect

Filter Bundle Forms are not typical GET-Forms, so it is not possible to simple copy the filter urls to share or bookmark a filtered list. To overcome this limitation, preselect urls can be generated. Preselect urls for the current filter can be found within template variabled, you can create a preselect content element or get the url programmatically from the FilterConfig.

Template variables

If a filter is set, the variable preselectUrl contains the preselection url for the current filter. It's available in the filter templates and the frontend module template.

You can for example create a copy preselect url button:

{% if preselectUrl is defined and preselectUrl is not empty %}
   <div class="col-xd-12 col-md-3">
   <a class="btn btn-primary" onclick="navigator.clipboard.writeText('{{ preselectUrl }}');alert('Copied preselect link!');return false;">Filtervorauswahllink kopieren</a>
   </div>
{% endif %}

Content element

You can use one of the following content elements:

  • "Filter-Preselect" with optional redirect functionality to preselect filter on given page
  • "Filter-Hyperlink" with filter preselect feature

FilterConfig

You can generate the preselect link from the FilterConfig instance

<?php 
use HeimrichHannot\FilterBundle\Manager\FilterManager;

class CustomController {
   private FilterManager $filterManager;
   
   public function invoke(): string
   {
       $filterConfig = $this->filterManager->findById($this->objModel->filter);
       return !empty($filterConfig->getData()) ? $filterConfig->getPreselectAction($filterConfig->getData(), true) : ''
   }
}

Inserttags

Insert tag Arguments Description
{{filter_reset_url::*::*}} filter ID :: page ID or alias This tag will be replaced with a reset filter link to an internal page with (replace 1st * with the filter ID, replace 2nd * with the page ID or alias)

Templates (filter)

There are two ways to define your templates.

1. By Prefix

The first one is to simply deploy twig templates inside any templates or bundles views directory with the following prefixes:

** filter template prefixes**

  • filter_

More prefixes can be defined, see 2nd way.

2. By config.yml

The second on is to extend the config.yml and define a strict template:

Plugin.php

<?php

class Plugin implements BundlePluginInterface, ExtensionPluginInterface
{
    /**
     * {@inheritdoc}
     */
    public function getBundles(ParserInterface $parser)
    {
        …
    }

    /**
     * {@inheritdoc}
     */
    public function getExtensionConfig($extensionName, array $extensionConfigs, ContainerBuilder $container)
    {
        return ContainerUtil::mergeConfigFile(
            'huh_filter',
            $extensionName,
            $extensionConfigs,
            __DIR__ .'/../Resources/config/config.yml'
        );
    }
}

config.yml

huh:
  filter:
    templates:
      - {name: form_div_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_div_layout.html.twig'}
      - {name: form_table_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_table_layout.html.twig'}
      - {name: bootstrap_3_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_bootstrap_3_layout.html.twig'}
      - {name: bootstrap_3_horizontal_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_bootstrap_3_horizontal_layout.html.twig'}
      - {name: bootstrap_4_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_bootstrap_4_layout.html.twig'}
      - {name: bootstrap_4_horizontal_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_bootstrap_4_horizontal_layout.html.twig'}
      - {name: foundation_5_layout, template: '@HeimrichHannotContaoFilter/filter/filter_form_foundation_5_layout.html.twig'}
    template_prefixes:
      - filter_

Developers

Events

Event Event ID Description
Adjust filter options huh.filter.event.adjust_filter_options_event
Adjust filter value huh.filter.event.adjust_filter_value_event
FilterConfigInitEvent FilterConfigInitEvent::class Modify config on FilterConfig initialization.
FilterBeforeRenderFilterFormEvent FilterBeforeRenderFilterFormEvent:class Modify the filter form template context before rendering
FilterFormAdjustOptionsEvent FilterFormAdjustOptionsEvent::class Modify form options before building the form.
FilterQueryBuilderComposeEvent FilterQueryBuilderComposeEvent::class Description provided below.
ModifyJsonResponseEvent huh.filter.event.modify_json_response_event Modify the JSON response of async form submits.

FilterQueryBuilderComposeEvent

In this event you can modify the data before the query for the current element is created and added to the QueryBuilder. It is also possible to add a query within in the event and skip the subsequent query creating.

function __invoke(FilterQueryBuilderComposeEvent $event): void
{
    // modify values before creating the query
    if ($event->getName() === 'my_field') {
         if ("special_value" === $event->getValue()) {
             $event->setOperator(DatabaseUtil::OPERATOR_NOT_IN);
             $event->setValue([3,5]);
             return;
         }
     }
     // create a custom query and skip the default query creation pars.
     if ($event->getName() === 'totally_custom_field') {
        // do some magic
        $event->getQueryBuilder()->andWhere('custom_table_field REGEXP '.$magicValue);
        $event->setContinue(false);
     }
}

Bootstrap 4 form snippets

The following bootstrap 4 form theme snippets can be used to generate uncommon, but existing bootstrap 4 form widgets within your custom filter_form_bootstrap4*.html.twig template.

Radio buttons

Replace categories with the name of your custom field. Remove onchange handler if not required. Select fallback can be used on small devices, if too many options, display/hide, using @media breakpoints.

{% if(form.categories is defined) %}
    <div class="disable-hidden-inputs {{ ('form-group' ~ ' ' ~ form.categories.vars.id ~ ' ' ~ form.categories.vars.name ~ ' ' ~ form.categories.vars.attr.class)|trim }}">
        {{ form_label(form.categories) }}
        {% do form.categories.setRendered %}
        <div class="select-fallback">
            <label class="form-control-label" for="{{ form.categories.vars.id }}-select">{{ form.categories.vars.label|trans }}</label>
            <select id="{{ form.categories.vars.id }}-select" onchange="this.form.submit();" name="{{ form.categories.vars.full_name }}" class="form-control">
                {% for key,choice in form.categories.vars.choices %}
                    <option data-icon="category-{{ choice.value }}" value="{{ choice.value }}"{{ (choice.value == form.categories.vars.value ? ' selected' : '') }}>{{ choice.label }}</option>
                {% endfor %}
            </select>
        </div>
        <div class="btn-group btn-group-toggle" data-toggle="buttons">
            {% for key,choice in form.categories.vars.choices %}
                <label class="{{ ('btn btn-link' ~ (choice.value == form.categories.vars.value ? ' active' : ''))|trim }}">
                    <input type="radio" id="{{ form.categories.vars.id }}_{{ key }}" {% if choice.value == form.categories.vars.value %}checked{% endif %}
                           autocomplete="off" onchange="this.form.submit();" name="{{ form.categories.vars.full_name }}" value="{{ choice.value }}">
                    {{ choice.label }}
                </label>
            {% endfor %}
        </div>
    </div>
{% endif %}

You must also set the non visible inputs to disabled in order to prevent them from being submitted and overwrite selected value due to same input name. The following script can be used to achieve this behavior.

(function($) {
    function disableHiddenInputs () {
        var $selector = $('.disable-hidden-inputs');
        $selector.find(':hidden').children(':input').prop('disabled', true);
        $selector.find(':not(:hidden)').children(':input').prop('disabled', false);
    };
    
    $(function() {
        disableHiddenInputs();
    });

    $(window).resize(function() {
        disableHiddenInputs();
    });
})(jQuery);
Comments
  • Multi-range scheint nicht zu funktionieren

    Multi-range scheint nicht zu funktionieren

    Ich habe vielleicht einen Bedienfehler oder auch nicht. Ich will einen Multi-Range Element nutzen. Dafür habe ich wie in der Anleitung ein filter-start und filter-stop Wert angelegt und das dann im Multi-Range assoziiert. Das Column was in der Datenbank durchsucht werden soll hat Zahlen enthalten in Form von xx.xx enthalten ist aber varchar(255). Wenn ich jetzt eine Range im Start und Stopfeld eingebe wird nie was gefunden außer ich gebe Operatoren an die beim Starfeld <= bzw < sind ... Wenn ich beim Filter-start > oder >= und beim Filter-Stop < oder <= angebe wird nichts ausgegeben obwohl die Tabelle mit solchen Werten enthält. Liegt das "nichtfunktionieren" daran, dass ich in der Datenbank varchar(255) für die Spalte habe?

    opened by Olli 10
  • Wie im Filter html hinzufügen?

    Wie im Filter html hinzufügen?

    Ich möchte einen komfortablen JS Rangeslider nutzen. Dafür müsste ich zwischen den Filter aber HTML einfügen können. Ist das irgendwie zu realisieren (ähnlich einem html CE bei Contao)?

    opened by Olli 9
  • Fix initial only types not evaluated as inital types

    Fix initial only types not evaluated as inital types

    This PR fixes the issue that some types, that have no "non-intial option" are not evaluated as initial type.

    This covers followig types:

    • sql
    • published
    opened by koertho 4
  • Umstellung auf POST → Fehler → fehlendes Token

    Umstellung auf POST → Fehler → fehlendes Token

    Contao 4.9.8, 1.5.4 contao-filter-bundle

    Wenn ich den Filter auf POST umstelle, gibt es wegen eines fehlenden Tokens einen Fehler " Ungültiges Anfrage-Token ".

    opened by Olli 1
  • Fehler beim

    Fehler beim "Neue Benutzergruppe"

    Ich habe die Erweiterung contao-api-bundle installiert in dem zuge höchst warscheinlich auch diese Erweiterung. Ich wollte eine benutzergruppe für die API-Benutzer anlegen. Dabei ist folgender Error aufgetreten:

    Attempted to load class "ChoiceType" from namespace "HeimrichHannot\FilterBundle\Filter\Type".
    Did you forget a "use" statement for "Symfony\Component\Form\Extension\Core\Type\ChoiceType"?
    

    Die use-Klasse: use "HeimrichHannot\FilterBundle\Filter\Type\ChoiceType" gibt es auch gar nicht. Wenn ich in der "HeimrichHannot\CategoriesBundle\Filter\Type\CategoryChoiceType" den Symfony-namespace use Symfony\Component\Form\Extension\Core\Type\ChoiceType; bekannt gebe, ist zu mindest der Fehler weg.

    opened by srhinow 1
  • Multiple in Filterelement aktivieren

    Multiple in Filterelement aktivieren

    Es erscheint folgende Fehlermeldung sobald man beim Filterelement die Option "multiple" aktiviert.

    Unable to transform value for property path "[groups]": Expected an array.

    Stack Trace 1/2

    Symfony\Component\Form\Exception\TransformationFailedException:
    Expected an array.
    
      at vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToValuesTransformer.php:42
      at Symfony\Component\Form\Extension\Core\DataTransformer\ChoicesToValuesTransformer->transform(1)
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:1104)
      at Symfony\Component\Form\Form->normToView(1)
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:350)
      at Symfony\Component\Form\Form->setData(1)
         (vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php:49)
      at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms(array('f_id' => '1', 'f_ref' => 'https://domain.tld/app_dev.php/auflistung.html', 'groups' => 1), object(RecursiveIteratorIterator))
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:383)
      at Symfony\Component\Form\Form->setData(array('f_id' => '1', 'f_ref' => 'https://domain.tld/app_dev.php/auflistung.html', 'groups' => 1))
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:487)
      at Symfony\Component\Form\Form->initialize()
         (vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php:226)
      at Symfony\Component\Form\FormBuilder->getForm()
         (vendor/heimrichhannot/contao-filter-bundle/src/Config/FilterConfig.php:525)
      at HeimrichHannot\FilterBundle\Config\FilterConfig->mapFormsToData()
         (vendor/heimrichhannot/contao-filter-bundle/src/Config/FilterConfig.php:148)
      at HeimrichHannot\FilterBundle\Config\FilterConfig->buildForm(array('f_id' => '1', 'f_ref' => 'https://domain.tld/app_dev.php/auflistung.html', 'groups' => 1))
         (vendor/heimrichhannot/contao-filter-bundle/src/Module/ModuleFilter.php:66)
      at HeimrichHannot\FilterBundle\Module\ModuleFilter->compile()
         (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:220)
      at Contao\Module->generate()
         (vendor/heimrichhannot/contao-filter-bundle/src/Module/ModuleFilter.php:55)
      at HeimrichHannot\FilterBundle\Module\ModuleFilter->generate()
         (vendor/contao/core-bundle/src/Resources/contao/elements/ContentModule.php:68)
      at Contao\ContentModule->generate()
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:480)
      at Contao\Controller::getContentElement(object(ContentModel), 'main')
         (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:183)
      at Contao\ModuleArticle->compile()
         (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:220)
      at Contao\Module->generate()
         (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:65)
      at Contao\ModuleArticle->generate(false)
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:420)
      at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:279)
      at Contao\Controller::getFrontendModule('0', 'main')
         (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:174)
      at Contao\PageRegular->prepare(object(PageModel))
         (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:47)
      at Contao\PageRegular->getResponse(object(PageModel), true)
         (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:306)
      at Contao\FrontendIndex->renderPage(object(Collection))
         (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:75)
      at Contao\FrontendIndex->run()
         (vendor/contao/core-bundle/src/Controller/FrontendController.php:42)
      at Contao\CoreBundle\Controller\FrontendController->indexAction()
         (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
         (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
         (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
         (web/app_dev.php:64)
    

    2/2

    Symfony\Component\Form\Exception\TransformationFailedException:
    Unable to transform value for property path "[groups]": Expected an array.
    
      at vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:1107
      at Symfony\Component\Form\Form->normToView(1)
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:350)
      at Symfony\Component\Form\Form->setData(1)
         (vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Core/DataMapper/PropertyPathMapper.php:49)
      at Symfony\Component\Form\Extension\Core\DataMapper\PropertyPathMapper->mapDataToForms(array('f_id' => '1', 'f_ref' => 'https://domain.tld/app_dev.php/auflistung.html', 'groups' => 1), object(RecursiveIteratorIterator))
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:383)
      at Symfony\Component\Form\Form->setData(array('f_id' => '1', 'f_ref' => 'https://domain.tld/app_dev.php/auflistung.html', 'groups' => 1))
         (vendor/symfony/symfony/src/Symfony/Component/Form/Form.php:487)
      at Symfony\Component\Form\Form->initialize()
         (vendor/symfony/symfony/src/Symfony/Component/Form/FormBuilder.php:226)
      at Symfony\Component\Form\FormBuilder->getForm()
         (vendor/heimrichhannot/contao-filter-bundle/src/Config/FilterConfig.php:525)
      at HeimrichHannot\FilterBundle\Config\FilterConfig->mapFormsToData()
         (vendor/heimrichhannot/contao-filter-bundle/src/Config/FilterConfig.php:148)
      at HeimrichHannot\FilterBundle\Config\FilterConfig->buildForm(array('f_id' => '1', 'f_ref' => 'https://domain.tld/app_dev.php/auflistung.html', 'groups' => 1))
         (vendor/heimrichhannot/contao-filter-bundle/src/Module/ModuleFilter.php:66)
      at HeimrichHannot\FilterBundle\Module\ModuleFilter->compile()
         (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:220)
      at Contao\Module->generate()
         (vendor/heimrichhannot/contao-filter-bundle/src/Module/ModuleFilter.php:55)
      at HeimrichHannot\FilterBundle\Module\ModuleFilter->generate()
         (vendor/contao/core-bundle/src/Resources/contao/elements/ContentModule.php:68)
      at Contao\ContentModule->generate()
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:480)
      at Contao\Controller::getContentElement(object(ContentModel), 'main')
         (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:183)
      at Contao\ModuleArticle->compile()
         (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:220)
      at Contao\Module->generate()
         (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:65)
      at Contao\ModuleArticle->generate(false)
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:420)
      at Contao\Controller::getArticle(object(ArticleModel), false, false, 'main')
         (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:279)
      at Contao\Controller::getFrontendModule('0', 'main')
         (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:174)
      at Contao\PageRegular->prepare(object(PageModel))
         (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:47)
      at Contao\PageRegular->getResponse(object(PageModel), true)
         (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:306)
      at Contao\FrontendIndex->renderPage(object(Collection))
         (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:75)
      at Contao\FrontendIndex->run()
         (vendor/contao/core-bundle/src/Controller/FrontendController.php:42)
      at Contao\CoreBundle\Controller\FrontendController->indexAction()
         (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
      at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
         (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
      at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
         (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
      at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
         (web/app_dev.php:64)
    

    Contao Version 4.4.23

    bug 
    opened by kehr-solutions 1
  • Update filter preselect options

    Update filter preselect options

    This PR changes how filter preselect options are generated. There should be now the same options available as in the frontend.

    Changed:

    • Added: FilterCollection class for single access to filter types
    • Changed: FilterPreselect options should now have same options as FilterConfigElement in the frontend
    • Changed: minimum php version is now 7.4
    • Changed: minimum utils bundle version is now 2.217
    • Changed: made FilterConfig::buildForm() configurable
    • Changed: refactored some code to modern coding standards
    • Fixed: some deprecations
    opened by koertho 0
  • fix invalid data types lead to outdated values

    fix invalid data types lead to outdated values

    If mapping the values to the forms fails in 1, the form values are not updated. This line refresh the values in the builder.

    1: https://github.com/heimrichhannot/contao-filter-bundle/blob/81f1bdecfd30e6023abf35a911930f46d4fb5efb/src/Config/FilterConfig.php#L654

    opened by koertho 0
  • Move hide label option into method

    Move hide label option into method

    This PR moved the evaluation of the hide label option into an override able method and uses this change in ResetType, SubmitType and ButtonType to fix problems with old db entries.

    opened by koertho 0
  • fixed wrong palettes

    fixed wrong palettes

    modified isInitial palettes for DateType, DateTimeType and time and removed hide label from submit and reset buttons since symfony-forms do not support label_attr

    opened by AlexejKossmann 0
  • [DRAFT] - Filter type refactoring

    [DRAFT] - Filter type refactoring

    This is the enchancement and fix for FilterTypes. After this every FilterType should only have options it actually supports.

    DOTO:

    • [x] add Text Type
    • [x] add Choice Type
    • [x] add DateTime Type
    • [x] add Button Type
    • [x] add QueryBuilder Helper
    • [x] extend FilterTextType
    • [x] extend ChoiceType
    • [x] extend DateTimeType
    • [x] extend ButtonType
    • [x] extend Template for FilterTextType, ChoiceType, DateTimeType, ButtonType
    • [x] write tests
    opened by AlexejKossmann 0
  • Feature-Request: Suchparameterabbildung in der URL

    Feature-Request: Suchparameterabbildung in der URL

    Hi, Kann man feste Suchen als URL darstellen? z.B. irgendwas wie /filter/fuechte/äpfel/farbe/rot oder so um z.B. damit verlinkbare Unterseiten aus der Suche zu generieren.

    opened by Olli 4
  • Resetbutton wird nicht angezeigt

    Resetbutton wird nicht angezeigt

    Contao 4.9.9 Filter Bundle Version 1.5.4

    Ich habe in den Filter einen Reset Button eingebaut. Der wird nicht angezeigt. Die Config des Buttons siehe Anhang: Screenshot_2020-10-29 Filter- Sortierkonfigurationen

    opened by Olli 3
  • Formulardaten mergen scheint nicht zu funktionieren

    Formulardaten mergen scheint nicht zu funktionieren

    Version 1.5.4 Contao 4.9.9

    Wenn ich einen Filter abschicke wird richtig gefiltert. Die Auswahl aus dem abgeschickten Filter wird aber nicht in den aktuellen Filter übernommen sondern es wird nichts ausgewählt - also der Filter ist zurück gesetzt.

    opened by Olli 5
  • Template kann in /templates/unterverzeichnis-templates nicht gefunden werden

    Template kann in /templates/unterverzeichnis-templates nicht gefunden werden

    Contao 4.9.8 - Filterbundle 1.5.4

    Ich habe ein Template für mein Formular in /templates/unterverzeichnis abgelegt. In der Filterconfig ist dieses Template auch auswählbar. Ich bekomme aber einen Fehler, dass Template nicht findbar ist. Folgende Fehlermeldung kommt

    request.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "Unable to find template "/www/htdocs/*/*/templates/unterverzeichnis-templates/filter_form_*_div_layout.html.twig" (looked into: /www/htdocs/*/*/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /www/htdocs/*/*/templates, /www/htdocs/*/*/vendor/symfony/twig-bridge/Resources/views/Form)." at /www/htdocs/*/*/vendor/twig/twig/src/Loader/FilesystemLoader.php line 250 {"exception":"[object] (Twig\\Error\\LoaderError(code: 0): Unable to find template \"/www/htdocs/*/*/templates/unterverzeichnis-templates/filter_form_*_div_layout.html.twig\" (looked into: /www/htdocs/*/*/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /www/htdocs/*/*/templates, /www/htdocs/*/*/vendor/symfony/twig-bridge/Resources/views/Form). at /www/htdocs/*/*/vendor/twig/twig/src/Loader/FilesystemLoader.php:250)"}

    So wie es aussieht wird in /templates gesucht aber nicht in /templates/unterverzeichnis-templates . Das Verzeichnis ist aber im Theme als templates Ordner angegeben.

    opened by Olli 5
Releases(1.23.3)
Owner
Heimrich & Hannot GmbH
Heimrich & Hannot GmbH
An Eloquent Way To Filter Laravel Models And Their Relationships

Eloquent Filter An Eloquent way to filter Eloquent Models and their relationships Introduction Lets say we want to return a list of users filtered by

Eric Tucker 1.5k Jan 7, 2023
A package to filter laravel model based on query params or retrieved model collection

Laravel Filterable A package to filter laravel model based on query params or retrived model collection. Installation Require/Install the package usin

Touhidur Rahman 17 Jan 20, 2022
Filter resources with request parameters

FilterWhere Filter resources with request parameters Author: Thomas Jakobi [email protected] License: GNU GPLv2 Features With this MODX Revolu

Thomas Jakobi 1 Jul 12, 2022
🖖Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any kind of filters.

Repository Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any

Awes.io 160 Dec 26, 2022
A Laravel 8 and Livewire 2 demo showing how to search and filter by tags, showing article and video counts for each tag (Polymorphic relationship)

Advanced search and filter with Laravel and Livewire A demo app using Laravel 8 and Livewire 2 showing how to implement a list of articles and tags, v

Sérgio Jardim 19 Aug 29, 2022
An Eloquent Way To Filter Laravel Models And Their Relationships

Eloquent Filter An Eloquent way to filter Eloquent Models and their relationships Introduction Lets say we want to return a list of users filtered by

Eric Tucker 1.5k Dec 30, 2022
Laravel Nova filter for Spatie/laravel-tags

SpatieTagsNovaFilter This package allows you to filter resources by tags. (using the awesome Spatie/laravel-tags and Vue-MultiSelect ) Installation Fi

Mahi-Mahi 3 Aug 4, 2022
Joomla Framework Filter Package

The Filter Package Installation via Composer Add "joomla/filter": "~2.0.*@dev" to the require block in your composer.json and then run composer instal

Joomla! Framework 10 Dec 16, 2022
Eloquent Filter is a package for filter data of models by the query strings. Easy to use and fully dynamic.

Eloquent Filter Eloquent Filter adds custom filters to your Eloquent Models in Laravel. It's easy to use and fully dynamic. Table of Content Introduct

Mehdi Fathi 327 Dec 28, 2022
The query filter bundle allows you to filter data from QueryBuilder and the Database

The query filter bundle allows you to filter data from QueryBuilder and the Database. you can filter multiple columns at the same time and also you can filter relation fields with two-level deep and without any join in your query builder.

Milad Ghofrani 0 Apr 8, 2022
The query filter bundle allows you to filter data from QueryBuilder and the Database.

The query filter bundle allows you to filter data from QueryBuilder and the Database. you can filter multiple columns at the same time and also you can filter relation fields with two-level deep and without any join in your query builder.

Bugloos 15 Dec 29, 2022
Contao Open Source CMS

About Contao is a powerful open source CMS that allows you to create professional websites and scalable web applications. Visit the project website fo

Contao 252 Dec 22, 2022
Contao extension to provide content templates for pages.

Contao Content Templates In Contao, the regular content of a page can be made up of different articles, each assigned to different sections of a page

inspiredminds 7 Oct 11, 2022
Contao extension to provide the possibility of defining alternative images to be used on different output devices.

Contao Image Alternatives This extensions expands the capabilities of using responsive images with art direction in Contao. You will have the possibil

inspiredminds 6 May 30, 2022
The news bundle adds news functionality to Contao 4

Contao 4 news bundle The news bundle adds news functionality to Contao 4. Contao is an Open Source PHP Content Management System for people who want a

Contao 8 Jan 10, 2022
Quickly and easily expose Doctrine entities as REST resource endpoints with the use of simple configuration with annotations, yaml, json or a PHP array.

Drest Dress up doctrine entities and expose them as REST resources This library allows you to quickly annotate your doctrine entities into restful res

Lee Davis 88 Nov 5, 2022
CakePHP3: plugin that facilitates versioned database entities

Version A CakePHP 4.x plugin that facilitates versioned database entities Installation Add the following lines to your application's composer.json: "r

Jose Diaz-Gonzalez 52 Sep 3, 2022
Easily exclude model entities from eloquent queries

Laravel Excludable Easily exclude model entities from eloquent queries. This package allows you to define a subset of model entities who should be exc

H-FARM 49 Jan 4, 2023
A plugin that adds worker entities to minecraft.

WorkersDemo A plugin that adds worker entities to minecraft. Workers does things that players does such as mining wood/stone etc. How to use? You can

Oğuzhan 6 Dec 17, 2021
This small POC aims to show how Symfony is able, natively without modifications, to use subdirectories for Entities, Repositories, controllers, views…

POC - Using Sub Directories in a Symfony Project This small POC aims to show how Symfony is able, natively without modifications, to use subdirectorie

Yoan Bernabeu 2 May 12, 2022