Allow access to module properties from its content block #245

Closed
geb-bot opened this Issue Feb 3, 2013 · 3 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
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
geb-bot commented Feb 4, 2013

Originally posted by Marcin Erdmann.

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

@geb-bot
geb-bot commented Jun 16, 2014

Resolved

@geb-bot geb-bot added the Improvement label Apr 12, 2015
@erdi erdi was assigned by geb-bot 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