Is there a way to access the context key name from a tag Like [[+context_name]] or [[+context]]? I have a single install set-up with multiple contexts (foo1, foo2, foo3) they are not subdomained but each its own domain, but sharing a manager installation.
Basically I would like to be able generate something like body id="context name" which I can then manipulate via css. I can manually add the context key/value in the context settings (which works out great) but I was wondering if there was an existing way to do it (such as [[+context_key]] or something along those lines. It could also come in handy when using the if comparison. Ive poked around in the database but I just can’t seem to come up with the right name (context, context_key, key yadda yadda).
This is my first foray into revo and the new arky so If ive missed something...
thanks-
P
Yes!
I had the exact same idea, and it works fantastic. I remember reading a complicated article about how to do this with multiple index files, loads of directories, all very impressive, but I remember shrugging and thinking I’m already doing that with no index file changes and no extra folders.
This is the little beauty you need:
Nice. Works perfectly. I wonder why it would be the "*" versus the "+" like the other context settings...Ill get my legs one of these days.
Appreciate the heads up-
P
[[*context_key]] is the Context of the current Resource, and therefore, the current Context. It is a Resource Field, which starts with [[*.
Context Settings, [[++, are very different - those are Settings applied to that Context.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com