Skip to content
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
Closed

Allow access to module properties from its content block #245

geb-bot opened this issue Feb 3, 2013 · 3 comments
Assignees
Milestone

Comments

@geb-bot
Copy link

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
Copy link
Author

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
Copy link
Author

geb-bot commented Feb 4, 2013

Originally posted by Marcin Erdmann.

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

@geb-bot
Copy link
Author

geb-bot commented Jun 16, 2014

Resolved

@geb-bot geb-bot added this to the 0.10.0 milestone Apr 12, 2015
@geb-bot geb-bot closed this as completed Apr 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants