MultiSwitch Stack

Select content based on different field values of a form submissions, or on a URL parameter.
Overview
ShowHide Stack icon
The MultiSwitch Stack lets you control the content of your page based on arguments passed from a form, or in the page URL (eg: index.php?product=shirt), in a way similar to PostSwitch. However, where each instance of PostSwitch only allows you to check for one set of values, MultiSwitch lets you compare (and show different Stacks for) any number of values. Great for product pages, selecting FAQ responses, search results, etc. Easily nest and scale for any number of values.

How does it work?
The argument passed in the URL, or from the form is decoded and compared against all the different values to determine whether your stacks should be shown or not.
  • ShowHide Stack screen shot
Customize
ShowHide Stack parameters
The MultiSwitch Stack can look at an argument passed from a form, in the page URL, or set elsewhere in PHP code on the page. Options allow you to choose the name of the argument or variable, and where it comes from, then choose how many different values you want to show stacks for.

Parameters

Argument nameEnter the name of the arg to look for in $_GET (index.php?arg=value in the URL), or the form field name to look for in $_POST, or the name of an internal PHP variable ($something used in PHP on this page), in that order. This should not be left blank. This stack creates a PHP variable with this Argument name.
1. Check GET?Look for the URL parameter such as index.php?arg=value in $_GET[], where arg is Argument name.
2. Check POST?Look for the form field name called Argument name, in $_POST[].
3. Check PHP Variable?Look for a PHP variable such as $something (defined elsewhere in the PHP of this page) called Argument name.
Check for no matches [or nest *]Show stack(s) when Argument matches NONE of the values below. Optionally, for more check values, enable this option and nest another MultiSwitch in the edit area..
#1: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#1Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#2: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#2Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#3: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#3Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#4: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#4Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#5: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#5Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#6: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#6Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#7: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#7Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#8: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#8Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#9: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#9Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
#10: Check for arg value(s) ...Show stack(s) when Argument matches one of the values below ...
#10Enter one or more strings separated by comma and/or space; a match is achieved when the Argument named above exactly equals ANY ONE OR MORE of the values.
Examples
Check out a examples of MultiSwitch - similar results to PostSwitch, but much easier to manage in RapidWeaver as everything is inside a single Stack …
Example 1: a basic list of buttons are used in this example, each one linking back to this very page with product=1,2,3,4 parameters in the URL (hover the mouse to see). Click each Try button to see the content that the MultiSwitch Stack displays. The content displayed is entirely up to you, and could be images, product information, text, etc.
Click a Try button above and scroll back down to see this Stack in action!
This page has not been called with product parameter yet - the MultiSwitch Stack knows!

MultiSwitch Features

  • Requires PHP
  • Sparkle updates

MultiSwitch PostSwitch

  • $5 USD via PayPal
  • Immediate download *