Skip to content

Allow data.json inheritance at pattern group level #599

Open
@tburny

Description

@tburny

I am using Pattern Lab Node v2.7.1 on Linux, with Node v4.6.2, using the Grunt Edition.

Expected Behavior

Especially for patterns in the pages category it should be possible to override the global data.json with category-specific values. Pattern data can still override the data, so the chain should be _data/data.json_source/patterns/pages/data.json_source/patterns/pages/my-page.json where → means overridden by.
A use case is that there might be homepages with different brands. For instance there are (München Ticket) (http://muenchenticket.de) and Sueddeutsche Tickets (SZ) which share the same layout, but brands should be interchangable in the PL based on the data.json.
The advantage is that for SZ pages the JSON doesn't have to be defined for each and every SZ page.

Actual Behavior

Placing a data.json in a subfolder of patterns has no effect (unless there is a pattern named data.html of course).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions