I have a site which I need to turn into 2 contexts and I was wondering if In/Output Modifiers worked with contexts and how would I reference a Context.
IE
If Context = Context A, use Logo A else is Context - Context B use Logo B
If Context = Context A, redirect Formit Confirmation to Confirmation Page A. Else If Context = Context A, redirect Formit Confirmation to Confirmation Page B
That kind of thing.
...
-
☆ A M B ☆
- 894 Posts
For something like this I use Context Settings.
Make a context setting for each site so for example I make a Logo context setting which contains the path to the logo then you use the context setting in your templates to display the logo like this:
You can do the same for your formit confirmation page, emails and pretty much any settings or parameters you want, Context Settings are like global template variables for the context just make sure you clear your cache every time you edit them.
Context Settings are extremely useful especially to reuse code I go into more detail on how to use Context Settings in my tutorial
here.
Good luck.
-
☆ A M B ☆
- 894 Posts
Glad to help
This is probably a bit more work than your idea but I discovered I can set a unique system setting for each context and call a chunk based on that.
[[++Context-ID:is=`WebsiteA`:then=`[[$Get-Website-A-Chunk`]]
Still, nice to have both options. I can think of several areas where I could have used this in the past and hadn't.
...