I’d like the ability to add a custom stylesheet to certain pages in my site that have content requiring extra formatting -- a blog display page, for instance -- to avoid code bloat in the CSS files that are permanently linked to my template. I know I could use inline styles, but I’d prefer not to.
Now, a TV seems like the obvious answer, but I’d like to keep the editing process as simple as possible for the sake of my non-technical content editing users. I’ve already tested, and while setting the TV to "locked" prevents non-admin users from editing it, it still shows up in the document editing view and I don’t particularly relish the thought of explaining to my users "oh, just ignore that." If there’s a switch I’m missing to hide TVs from users that aren’t authorized/don’t need to touch them, that would be beyond excellent.
Option #2 seems to be using a page-unique identifier (probably [*alias*]) as the CSS filename -- ie, my template would include
<link rel="stylesheet" src="/assets/templates/templatename/[*alias*].css" />
but that’s a bit more granular than I’d ideally like. Is there a hidden ModX variable for "highest non-zero parent’s alias" or something? I’d prefer something a bit more flexible than that, but so long as it keeps the code out of non-admin users’ view, its fine, I suppose.
[edit: So, I just found out about [!UltimateParent!]. I suppose that makes option #2 somewhat more palatable, although it’ll result in some ugly CSS filenames. Is there anything else I’m missing here? ]