We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    MIGX handles defaults and Inherits a bit different than normal TVs.
    With the latest version of getImageList on github:
    https://raw.githubusercontent.com/Bruno17/MIGX/master/core/components/migx/elements/snippets/getimagelist.snippet.php

    there is a new property &inheritFrom

    for example:

    [[getImageList?
    &tvname=`sidebar`
    &inheritFrom=`parents,33`
    &tpl=`@CODE:[[$[[+sideblock]]]]`
    ]]


    would try to inherit from all parents, if they are also empty, it does try to load the items from resource 33 (could be more commaseparated resource-ids)

    This way, you can have one Master-Resource, which might be hidden from the frontend, where the site-manager can define the default items, where getImageList would inherit from, if empty.
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 36446
      • 184 Posts
      Quote from: Bruno17 at Dec 08, 2014, 02:51 PM
      MIGX handles defaults and Inherits a bit different than normal TVs.
      With the latest version of getImageList on github:
      https://raw.githubusercontent.com/Bruno17/MIGX/master/core/components/migx/elements/snippets/getimagelist.snippet.php

      there is a new property &inheritFrom

      for example:

      [[getImageList?
      &tvname=`sidebar`
      &inheritFrom=`parents,33`
      &tpl=`@CODE:[[$[[+sideblock]]]]`
      ]]


      would try to inherit from all parents, if they are also empty, it does try to load the items from resource 33 (could be more commaseparated resource-ids)

      This way, you can have one Master-Resource, which might be hidden from the frontend, where the site-manager can define the default items, where getImageList would inherit from, if empty.

      Thanks! This works just great!!
        https://www.beautyislife-shop.de - premium make-up!
        https://www.topsterne.de - sell it here!
        ---------------------------------------------------------
        • 36446
        • 184 Posts
        strange... it doesn't seem to work on all resources as i thought in the first place. It seems that it doesn't check consequently if the tv is really empty. Sometimes the "inherit" parameter gets the value from its parent - sometimes it doesn't - in the second case my imagelist stays just empty without output...
        tried cached and uncached without effect...

          https://www.beautyislife-shop.de - premium make-up!
          https://www.topsterne.de - sell it here!
          ---------------------------------------------------------