We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

nGen file paths

Development and Programming

stubear's avatar
stubear
114 posts
16 years ago
stubear's avatar stubear

I’m in the middle of converting our site (http://www.monderer.com) over to EE to make it easier to update and manage as it’s currently a little wonky to update without knowing a little about how the site was built and since I’m the designer and coder, I’m the guy who has to deal with it. Anyway, I’m currently trying to implement our portfolio as a template and I’ve run into a couple problems.

The biggest problem currently is trying to get the slideshow to work with the FF MAtrix/nGen field type. I am currently using FF Matrix/nGen to upload and associate multiple images and alt text for each within a single project entry form. If you go to the branding page for instance and look at the code you’ll see I have a script that builds the slideshow from an array (old site; ee site is still being developed locally). There are two attributes, one is an array for the image names only and the other is a path to the images. When I pass the FF Matrix data into this script I can’t separate the path from the image names and my array winds up including both. Basically I need to know if there is a way to use FF Matrix, short of adding extra fields in the FF Matrix field for file name and file path, and parse this information for the purposes of this script?

       
silenz's avatar
silenz
1,651 posts
16 years ago
silenz's avatar silenz

Maybe you can use it in conjunction with Extract URL Plus 2 to pull out the filenames…

       
stubear's avatar
stubear
114 posts
16 years ago
stubear's avatar stubear

The nGen file field doesn’t appear to pass a full URL so extract URL doesn’t appear to be able to determine the constituent elements of the file path, file name, extension, etc. I’m going to see what I can do to force a full URL for Extract to be able to parse but currently this solution doesn’t work.

update: One other issue I’m running into is parsing the EE tag within javascript. The current script looks something like this:

<script>            
    pfolioGallery = new Slideshow('portfolio_img', {
        type: 'push',
        navigation: 'arrows+',
        duration: [250],
        width: 490,
        height: 344,
        images: ['img1.gif', 'img2.gif', 'img3.gif', 'img4.gif']
        hu: '/path/to/images/'
    });
</script>

Passing some of the parameters within both the field frame tags and the extract url tags throws the whole thing off the tracks. Perhaps I’m looking at this wrong and there’s a better way to approach this.

       
stubear's avatar
stubear
114 posts
16 years ago
stubear's avatar stubear

OK, with a little poking around I finally got this working. The documentation to Extract URL Plus 2 is a little wonky and it doesn’t seem to work with {site_url} either so I have to hardcode the initial url path in the Extract URL Plus 2 tags (something like this url=”htp://localhost{gallery_image}” instead of url=”{site_url}{gallery_image}”) which means this isn’t very portable and I’ll have to fix this when the site goes live.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.