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
    not possible with resourcefield-tags directly, but for example with the
    migxResourceMediaPath - snippet
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 50312
      • 34 Posts
      That's what I thought. Anyway, works great with the migxResourceMediaPath Snippet! Thanks for clarifying, Bruno.
        • 50312
        • 34 Posts
        Something I did not take into account: When accessing that imageTV from another Resource, the path changes accordingly to the alias of the current resource.

        Example: Website has 3 container-resources, each container has a few child resources. I set the imageTV "logo" on each container and want to access it on the child resources.

        Normally I would do it like this:
        <img src="[[#[[UltimateParent]]]].tv.logo">

        But that won't work, because the path is changed (due to the dynamic media source) from assets/images/parentalias/ to assets/images/childalias/

        This works:
        <img src="[[#[[UltimateParent]].tv.logo:replace=`[[*alias]]==[[#[[UltimateParent]].alias]]`]]">

        but adds massive site loading time.

        Is there an elegant solution to handle this?

        EDIT:
        Have had some struggle with caching issues, so came up with this (which is also faster):
        <img src="[[!#[[UltimateParent]].tv.logo:replace=`[[*alias]]==[[!#[[UltimateParent]].alias]]`]]">

        but still not the most elegant solution, i guess.. [ed. note: aaantz last edited this post 8 years, 3 months ago.]