Name Mapping for Web Elements shared between different pages
I am attempting to automate a test case we have that involves verifying that the Header and Footer elements of our site are present, and work on all of our pages.
The problem I am having is that in the NameMapping, the individual web elements can only be tied directly as a child to a single Page object. From what I've read and experimented with, this leaves us with only 2 options:
1) Duplicate the header and footer mappings for every, single, page.
2) Create a wildcard page (https://ourwebsite.com*) and putting the elements in that page entry
The problem with #1 is that none of the individual items are in any way linked or referenced to eachother, so if there are any changes to the shared element(s), then we would have to go and change every single one instead of just in once place, which could be decently common considering we revamp our site look more than once a year. Right now this would be a nuisance, but will actually cost us considerable time in the future as we expand our test coverage and the site gets more modernized and we keep adding shared web elements like a chat helper, notification modals, login/account segment, etc.
The problem with #2 is that creating a wildcard for the entire website means that Every object recording we would do in the future would automatically be assigned to that wildcard page in the NameMapping instead of the specific pages they belong to, which then just adds an additional step for us to go in and relocate every recorded object where they need to go to avoid an overcluttered mess.
Is there a more intentionally designed way to do this behavior instead of these hacks? I feel like this should be an extremely common use case with modern website design.