Results 1 to 2 of 2

Thread: Catalog reference and relation tables

  1. #1
    User
    Join Date
    01-29-13.
    Posts
    64

    Default Catalog reference and relation tables

    Hello,
    I have two tables related in a many-to-many relation as shown here:



    what I'd like to get is to create a catalog reference module, to be shown for example in "component details", which relates the selected component with the works related.

    I tried by adding a standard catalog reference module, using "components per work" as catalog and "components" as selected referenced catalog. What I get is the list of records in "components per work" related to component, which is good.
    Obviously - having the list of works related to the component I'm looking at - I'd like to have a link to the related work details. Hence, I put a link on the "work" field and override the redirect page to work-details. This does not work, because the link is opened with the ID of the "components per work" record, whilst I'd like it to be opened with the "work" cell value, which is the ID.

    An example:
    Work's ID: 33
    Component's ID: 3
    Record in "components per work":
    - row ID: 1
    - work: 33
    - component: 3
    - quantity: X

    in the module I see a row with the data above and a link on the "work" field. That link does not take me to the "work details" page with ID = 33, it takes me there with ID = 1, since 1 is the row ID in the "components per work" table.

    Do you know if there's any way to perform such a task?

    Thank you
    --
    Marco
    ---------
    Triste e' l'uomo
    che ama le cose
    solo quando si allontanano.
    (Baolian, libro dei pensieri Baol, I, vv. 1240-1242)

  2. #2
    User MacKP's Avatar
    Join Date
    06-19-09.
    Location
    Duisburg (Germany)
    Posts
    211

    Default Re: Catalog reference and relation tables

    hmm an relation of n:m is not possible with the normal modules of the catalog (this is contao based...).
    So you will have to write your own module ore script for that i think.

    regards
    Mediendepot Ruhr
    For real-time chat the (inofficial) Chatroom in IRC:
    -> irc.freenode.net #contao | irc.freenode.net #contao.de

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •