We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27167
    • 31 Posts
    Hi everyone,

    I'm relatively new to MIGXdb - so please excuse if these questions have already been answered. Also, please let me know if there is a documentation somewhere where the configuration settings are actually explained...

    I understood the concept of "Check Resource". Now, however I'm wondering whether you could make the items that are shown in a MIGXtv depending on an individual resources' TV value (or a snippet)?

    There are some settings in MIGXdb configuration which sound as if they might do something like this... but as I mentioned before, I couldn't find any information on what they actually do:
    - Check Resource TV
    - Join alias
    - Has Extra Connection Table

    Would be great to hear whether there is a way to do some advanced join configuration...

    Cheers!

    Siar [ed. note: SiarAneas last edited this post 12 years, 2 months ago.]
      • 27167
      • 31 Posts
      Hi!
      Could somebody just give me a quick hint on this?

      Cheers!

      Siar
        • 4172
        • 5,888 Posts
        I'm sure, there are allready some related posts at the forums.

        I think, what you are looking for, is the joins-field.

        If you have a field, for example, with resource_id and your schema has an aggregate like that:

        <aggregate alias="Resource" class="modResource" local="resource_id" foreign="id" cardinality="one" owner="foreign" />


        than its enough to have this

        joins:
        [{"alias":"Resource"}]


        you will have the Resource-fields availiable in your grid,with names like, for example:

        Resource_pagetitle


        you can join to multiple tables with
        [{"alias":"Resource"},{"alias":"Creator"}]


        and also to tables, where no aggregate is defined with:
        [{"alias":"Resource"},{"alias":"Creator"},{"alias":"Profile","classname":"modUserProfile","on":"Profile.internalKey=Creator.id"}]


        there is are additional attribute 'type' , which an be inner or right for inner or right-joins.
        and 'joinfields', if you don't need to fetch all of the fields.


        you can use the same json to join tables with migxLoopCollection in its &joins - property for joined frontend-listings
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 27167
          • 31 Posts
          Hi Bruno,

          thanks for your reply - I found some information about this - but what about these extra parameters in MIGXdb-settings?
          Like "Check Resource" -> "@TV"
          etc.

          -> is it possible to do a join based on the TV value of a resource instead of the resource ID?

          Thanks!

          Siar

            • 4172
            • 5,888 Posts
            these other fields have nothing todo with the join, what you need.
            would be to much, to explain them here (limited time)

            do you need a real join (which should also be possible within the joins-field)
            or can't you work with the renderChunk - renderer for a column.

            you can place snippets into the renderChunk - tpl, which can fetch the value you need.
            There are all other fields availiable as placeholders, which you can send as properties to the snippet-tag.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 27167
              • 31 Posts
              Let's say this is my Resource Tree:
              - Sweets (1)
              |----- Chocolate (2)
              |----- Strawberry (3)
              - Pralinés (4)
              |------ Chocolate (5)

              And this is my MIGXdb "sweets":
              id, resource, title, type
              1, 2, "Mars", "chocolate"
              2, 2, "Snickers", "chocolate"
              3, 2, "Duplo", "chocolate"

              Now if I create a MIGXtv and make it accessible to all the resources, check the field "Check Resource", the sweets in my MIGXdb will only be editable in the MIGXtv grid from Chocolate (2)

              What I would like to achieve is, that they are also editable from Chocolate (5).

              So I was thinking of giving each resource a TV "migxjoin" and (manually) set a value for each resource on which basis the join is then done when the MIGXdb items are loaded on the grid (I'm just talking about editing in the manager...):

              - Sweets (1)
              |------ Chocolate (2) [TV.migxjoin="chocolate"]
              |------ Strawberry (3) [TV.migxjoin="strawberry"]
              - Pralinés (4)
              |------ Chocolate (5) [TV.migxjoin="chocolate"]

              Now when loading the MIGXdb TV grid in either Chocolate (2) or Chocolate (5) the same items in the grid are displayed.

              Is there are built-in solution for this?

              Cheers!

              Siar