New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow access to module properties from its content block #245

Closed
geb-bot opened this Issue Feb 3, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@geb-bot

geb-bot commented Feb 3, 2013

Originally created by Marcin Erdmann.

The following doesn't work (just a simplified example, not a real use case):

class SomeModule extends Module {
    def destinationPage

    static content = {
        link(to: destinationPage) { $('a') }
    }
}

class SomePage extends Page [
    static content = {
        myModule { module SomeModule, destinationPage: SomeOtherPage }
    }
}

Currently module properties cannot be used in options passed to its content definitions. Getting it to work would be as simple as adding a propertyMissing() implementation to PageContentTemplateBuilder.

@geb-bot

This comment has been minimized.

geb-bot commented Feb 4, 2013

Originally posted by Luke Daley.

Just in case we don't get to this for a little bit, can you describe what the intent is here. It took me a while to work it out.

@geb-bot

This comment has been minimized.

geb-bot commented Feb 4, 2013

Originally posted by Marcin Erdmann.

I hope it's now more obvious what I mean.

@geb-bot

This comment has been minimized.

geb-bot commented Jun 16, 2014

Resolved

@geb-bot geb-bot added the Improvement label Apr 12, 2015

@geb-bot geb-bot added this to the 0.10.0 milestone Apr 12, 2015

@geb-bot geb-bot closed this Apr 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment