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 multiple pages/sections declarations per rule in templates.json files #8

Open
fdelaneau opened this issue Feb 13, 2021 · 0 comments

Comments

@fdelaneau
Copy link
Collaborator

fdelaneau commented Feb 13, 2021

Instead of:

"factsheets": {
    "stylesheets": [
        {
            "url": "/css/page.css"
        },
        {
            "url": "/css/factsheets.css"
        }
    ]
},
"factsheetsentry": {
    "stylesheets": [
        {
            "url": "/css/page.css"
        },
        {
            "url": "/css/factsheets.css"
        }
    ],
    "javascripts": [
        "/js/factsheet-payroll.js"
    ]
}

Allow to write:

"factsheets, factsheetsentry": {
    "stylesheets": [
        {
            "url": "/css/page.css"
        },
        {
            "url": "/css/factsheets.css"
        }
    ]
},
"factsheetsentry": {
        "javascripts": [
            "/js/factsheet-payroll.js"
        ]
    }
}

Note that this feature will somewhat be redundant with the Swig like inheritance #7 as you could then write:

"factsheets": {
    "stylesheets": [
        {
            "url": "/css/page.css"
        },
        {
            "url": "/css/factsheets.css"
        }
    ]
},
"factsheetsentry": {
    "stylesheets": [
        {
            "inherit": "factsheets"
        }
    ]
    "javascripts": [
        "/js/factsheet-payroll.js"
    ]
}
@fdelaneau fdelaneau changed the title Permettre des déclarations multiples au sein des fichiers templates.json Allow multiple pages/sections declarations per rule in templates.json files Feb 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant