We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13734
    • 11 Posts
    My template accesses different flash objects for different pages. One of them is at /assets/images/gallery/viewer.swf etc.

    I would like it so there can be a template variable so the person ediitng the page can select where the viewer.swf is for that page. I thought I could use the ’File’ template variable.. so the user can browse to where it is, and then the TV will store that location. However when I added the file TV..when you click ’Insert’ in manager, the directory window that opens goes straight to /assets/files directory and won’t let me go up one level to get to where I want to go?

    AM i doing this wrong

    cheers
      • 26931
      • 2,314 Posts
      hi jbjbjb,

      you could use "mm_allresourcetypes for ManagerManager"
      By default MODx only allows you to choose a folder (resource type) that accommodates the type of your template variable (file or image). This widget allows you to select the resource type within the "mcpuk" resource browser YOU want, no matter what type the TV is.
      -> http://modxcms.com/extras/package/584
        • 33337
        • 3,975 Posts
        Nice one sharkbait!

        :)
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 13734
          • 11 Posts
          SO how exactly do I use this?

          I have installed it, but I am not sure what it means by
          mm_widget_allresourcetypes(’’,’’); First parameter is for manager roles, second for templates.

          I would like it to work for anyone, and for the template ’gallery’ .. so what do i put for parameters?


          EDIT: I put nothing as parameters and it seems to work fine...but even though its working I don’t see what this is achieving.

          There is now a drop down box where I can choose Image or File or Flash or Media.

          If I select ’Image’, it let me browse the folders of images but it will NOT let me go above the folder /assets/images

          If I select ’File’, it only shows an html file that i have stored in assets/images .. it does not show any sub-folders, and does not let me go up one elvel.

          I am still no closer to being able to select a file (NOT image) that is in /assets/images/gallery