This feature would be very usefull!
From https://www.dokuwiki.org/plugin:const
Good time of day! Can i use const plugin with include plugin? I want to use some variables in include page, but it's rendered as %variable% on final page…
The const variables are only relevant for the pages where they are defined.
You can create a issue on github and i can have a look if I have time.
Thanks in advance!