Skip to content

Allow access to module properties from its content block #245

Description

@geb-bot

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions