Announcement

Collapse
No announcement yet.

BlockIf - Image Shown - Video Clip

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BlockIf - Image Shown - Video Clip

    I have created a variable at product level and set it's type to 'Filename'.

    I then have a Blockif which brings in an image if the variable is filled out with a link to the filename. The blockif is working as i wish, no problems there (woohoo). However, i have included all videos into a sub folder of the site1 folder for tidyness and when i select the filename on the product, it adds the 'VideoClips\filename.mpe' into the variable name.

    When i upload, the image shows when there is a filename specified, however it links to the incorrect place, it is adding 'VideoClips/' onto the url, which is of course failing as all things sit in 'acatalog' after upload and not in 'acatalog/VideoClips/'.

    Put me out of my misery please.

    Thank you.

    #2
    Sounds like you need to use some PHP or Javascript to strip out the directory name... or change the type to text and let the name be added manually (not as nice).

    ps. congrats on the working block if


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      V8 is usually good at sorting path-names within variables (or even generated code). I'd guess that it's something to do with the file extension being mpe. Try substituting a plain old jpg (still in VideoClips) and see what happens.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Well i thought it was a bug to be honest, but thought i would take the cautious route and be shown how stupid i am being instead. You really need to have the ability to file search for these as manual input is just plain crap.

        So i guess they will have to sit in the site1 folder and clutter that junkyard up as i can't see any other possibilities that are workable.

        Actinic need to sort this, it's once again almost a great feature.

        Woohoo i wasn't being thick, there's still time left though - watch this space!

        Comment


          #5
          Originally posted by NormanRouxel
          V8 is usually good at sorting path-names within variables (or even generated code). I'd guess that it's something to do with the file extension being mpe. Try substituting a plain old jpg (still in VideoClips) and see what happens.
          100% SPOT ON Norm, it can't handle the filename, but can handle the jpg image. Must be some kind of filtering i guess with some references not being processed as you would like.

          ADD - it fails on .wmv too.

          Comment


            #6
            I just copied the file from the video clips folder into the site root and on upload it warned me of a duplicate filename, so it thinks they are both in the same place, it just doesn't handle the folder strip out correctly on the variable.

            Put the file in the root - yuck, and it works fine.

            Sigh.............always something to complicate a most simple feature.

            Comment


              #7
              Hi Lee

              I was actually sent a workaround for a different problem just yesterday, which should also fix this.

              In the code, replace:

              <actinic:variable name="VariableName"/>

              with:

              <actinic:variable name="CatalogURL" /><actinic:block php="true">echo basename('<actinic:variable name="VariableName"/>');</actinic:block>

              The 'CatalogURL' bit os needed to keep the thing working OK with logged in customers.

              I'll be adding this to the Advanced User Guide.

              Comment


                #8
                Hi Chris

                Finally got round to testing this and all seems great.

                While we are on this subject if you don't mind, i have defined 9 variables for completion at product level, some of which will be used very little and some almost all of the time. Without changing the name of these, is there a way to get them showing in an order i choose rather than what actinic thinks? I'd like the common ones at the top for ease of use.

                The main problem is that you have to resize the window every single time to see them all at the same time as there is some strange window split facility which appears to be doing nothing to help?

                Cheers

                Lee

                Comment


                  #9
                  Hi Lee

                  New variables are displyed in alphabetical order of their Prompts, so you could change their prompts to

                  a) blah blah
                  b) blah blah

                  in order to create the correct order.

                  Comment


                    #10
                    I always enumerate my variables as it makes adding between the list easier and they are always forced to the top of the pile.


                    Bikster
                    SellerDeck Designs and Responsive Themes

                    Comment

                    Working...
                    X