Ergebnis 1 bis 3 von 3

Thema: FE lists of groups without visible filter

  1. #1
    Contao-Nutzer Avatar von justs
    Registriert seit
    29.11.2011.
    Ort
    Diepenheim, NL
    Beiträge
    19

    Standard FE lists of groups without visible filter

    I have this problem I can't solve although it looks so easy:

    - MM table with around 130 items
    - all items belong to one of 3 groups (another small MM table), that were selected from a menu in de BE form
    - I'd like to make FE lists of the 3 groups, without a visible filter, just 3 links to lists of the items of Group A, Group B and Group C.

    ... and all I get is all 130 items or nothing at all ("There are no items matching your search.").

    I've read the manual up and down and followed the instructions, but maybe I'm not getting an essential clue since it's in German…

    I would be very grateful for any advice. You can get a BE login, if you send me a private message.

    Thanks,

    Just

  2. #2
    Contao-Urgestein Avatar von Tim G
    Registriert seit
    13.02.2010.
    Ort
    Lübeck
    Beiträge
    2.210
    User beschenken
    Wunschliste

    Standard

    First of all, check if the selected value is stored directly in the field of your MM table or if it is stored in the tl_metamodel_tag_relation table.

    Basically you need 3 filters.

    If it is stored directely in the field, you can grab all entries with a filter like:
    Code:
    SELECT * FROM {{table}} WHERE MY-SELECT-FIELD=MY-VALUE
    or even better:
    Code:
    SELECT * FROM {{table}} WHERE MY-SELECT-FIELD IN(MY-VALUE)
    The value MY-VALUE is probably the ID of the selected foreign MM Entry.

    If it is stored in the ..._realtion Table your query should look like:
    HTML-Code:
    SELECT mm.* FROM {{table}} AS mm WHERE mm.id IN
    (
    SELECT tag.item_id 
    FROM tl_metamodel_tag_relation AS tag 
    WHERE tag.value_id=MY-VALUE GROUP BY tag.item_id
    )
    Geändert von Tim G (28.08.2013 um 12:21 Uhr)
    http://www.tim-gatzky.de ˙ auch schon wieder 2 Jahre alt - wie die Zeit vergeht... muss mal umbauen.

  3. #3
    Contao-Nutzer Avatar von justs
    Registriert seit
    29.11.2011.
    Ort
    Diepenheim, NL
    Beiträge
    19

    Standard

    After some fiddling around with the different places where you can define which filter to use, I got it right. Thanks a million, Tim!

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •