Code Monkey home page Code Monkey logo

Comments (2)

kitsunet avatar kitsunet commented on July 18, 2024

I am pretty sure there was a good reason for doing it this way. You shoulnd't if a processor anyway but rather use a control structure on the replacement ala value = ${value == 'abc' ? 123 : value}. While I guess in this special case of processors it could make sense to have the value already I find in normal rendering cases you would want to first evaluate if before doing anything on the fusion object in question.

from neos-development-collection.

mhsdesign avatar mhsdesign commented on July 18, 2024

in my specific case i just wanted to quickly notate this:

# resource:// or http://
resourceUri = 'resource://Foo.Bar'
[email protected] = Neos.Fusion:ResourceUri {
  @if.isResourceStreamWrapper = ${String.indexOf(value, 'resource://') == 0}
  path = ${value}
}

in the end i build a full blown prototype:

prototype(Neos.Neos:Core.ImageSource) < prototype(Neos.Fusion:Component) {
    path = ''
    renderer = Neos.Fusion:Case {
        resourcePath {
            condition = ${String.indexOf(props.path, 'resource://') == 0}
            renderer = Neos.Fusion:ResourceUri {
                path = ${props.path}
            }
        }
        default {
            condition = true
            renderer = ${props.path}
        }
    }
}

But i would be also fine with closing this as not planned, as my above prosed fusion config is not super easy to decipher i guess.
So to quickly move forward let met now if i should close this or well keep it open until we find the time to discuss this.

from neos-development-collection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.