I just had this idea, but I’m not sure if it is possible to do.
The idea is that I have a bunch of pages with static content, but would like a javascript and a css file to change. The js and css would be the resource (set through Internet Media Type).
The css I can use to populate a random banner image, so because it is random I don’t need to worry about which page isactually being viewed. However, with the javascript I have a accordion menu in mind that I want to have open on the page that the js is loaded through.
so if the resource R_1 loads R_js, I can have a snippet in there that will do something different than in R_2 is loading it.
Is there anything inside modx that could tell me what page loaded this resource (or right before it) prefferably without without using any additional javascript, cookies or sessions?