Obviously, I could just copy-paste that part 10 times and I’m done. However, if I need to make some changes later, I need to repeat those changes as well.
So what is the best way to minimize redundant repeating in my sitemap?
That’s true. However, one workaround (which I use) is to use a text template language or macro preprocessor for the sitemap and then generate the final site map using the tool. If you also use a tool to run commands when files change, you can just save the template and the sitemap will be automatically regenerated.
Duplicating sections of the sitemap in various locations would be one use case. I also use this technique to define macros for sections of the site map and then instantiate those sections for specific devices. For example, I have a relatively complex subpage for detailed information related to each of my network security cameras. With a macro, I can add a single line to the sitemap template with the parameter for a specific camera and the details frame is automatically generated. If I want to add some details to all the cameras, I only need to change the macro. I also use templates to generate sections that include multiperiod charting for numeric items, The pattern for defining these charts is the same across the items and it was tedious and error-prone to hand-maintain the mostly duplicated content.
i have my house set up where one item is for example in a seperate window section, where you can check the states of all windows, but these windows are also in the section where i have the house and all the rooms and i put it into the room it is in …
woulde be great if you could just define a kind of function that is used … like
code function window state 1
…
…
end
then you would just put the window state 1 function call into the places you need …