0
Welcome Guest! Login
0 items Join Now

I don't get this "gantry-media://" thing

    • shenk's Avatar
    • shenk
    • Hero Rocketeer
    • Posts: 408
    • Thanks: 11

    I don't get this "gantry-media://" thing

    Posted 3 months 3 hours ago
    • When you look at the logo particle, by default, the image is "gantry-media://logo.png", the "gantry-media" here is a combined a location, it could be referring to multiple folders. I don't really get the purpose of this setting. What if I have files in these folders with the same name? For example, if I upload my own logo.png file to the /images folder, it won't appear when I try to change the image of logo particle. Because under "gantry-media://" there is alreayd another "logo.png". I have to change my file's name to something like logo1.png, only then I can choose it.

      So what is the purpose of "gantry-media://", why not just use the normal path finder? And what advantage can I take from it?
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 21766
    • Thanks: 2579
    • Web Developer
  • Re: I don't get this "gantry-media://" thing

    Posted 3 months 2 hours ago
    • I asked a similar question some time ago as I wondered if it was possible to change the location and behaviour of the gantry-media root to suit my own purposes. Ive since discovered a bit more about it. Its declared in a function called getMediaPaths() which is located in

      site-root://libraries/gantry5/classes/Gantry/Framework/Platform.php

      The function is shown below:

      EDIT _ Ive realised that the RT forum is recognising parts of the function and not properly diaplaying it. Its to be found in the Platform.php file at:

      public function getMediaPaths()


      My own assumption as to the reasoning behind it is simply that the gantry devs sought to provide users with a centralised media repositry which drew on multiple absolute filesystem locations and in that respect I think it succeeds.

      Iv'e managed to get a handle on it since my original question on here and have edited some of the functions to include my own custom locations for my own convenience but I wouldnt recommend hacking it unless youre prepared to reimplement the hack after any gantry upgrade.

      The guys at RT rightly say its not something to mess with but I hope that provides a little insight.

      Paula
    • Last Edit: 3 months 1 hour ago by Paula Livingstone.
    • Do'er of stuff
  • Re: I don't get this "gantry-media://" thing

    Posted 3 months 1 hour ago
    • Thanks Damir, I didnt know about that issue. Very interesting.
    • Do'er of stuff
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 21766
    • Thanks: 2579
    • Web Developer

    Re: I don't get this "gantry-media://" thing

    Posted 3 months 43 minutes ago

Time to create page: 0.076 seconds