I'd like to define a constant on a single page on my DW, then be able to reference it from other pages to do calculations. This way, we'd only ever have to set some values in a single place, and have them work for several pages.
One way to do this would be to work with the output from the include plugin - at the top of the page you'd include a section or page, which would contain the const section. This assumes that you could have other const sections on the page and they'd just get concatenated.
Alternatively, the plugin could implement looking at another page itself, but it seems sensible to use the existing functionality of include and contribute any fixes needed.
My use case in more detail:
We have a fee for membership, and several things around the site are set in terms of that - for instance 2x monthly fee, 50% of monthly fee, and it's a pain to have to go around the site updating them all when the base fee changes. With consts across pages, we could just update a single place.
I'd like to define a constant on a single page on my DW, then be able to reference it from other pages to do calculations. This way, we'd only ever have to set some values in a single place, and have them work for several pages.
One way to do this would be to work with the output from the include plugin - at the top of the page you'd include a section or page, which would contain the const section. This assumes that you could have other const sections on the page and they'd just get concatenated.
Alternatively, the plugin could implement looking at another page itself, but it seems sensible to use the existing functionality of include and contribute any fixes needed.
My use case in more detail:
We have a fee for membership, and several things around the site are set in terms of that - for instance 2x monthly fee, 50% of monthly fee, and it's a pain to have to go around the site updating them all when the base fee changes. With consts across pages, we could just update a single place.