Variable Sidebars Depending on Which Page They Came From
Permalink
Let's say I have 1 product that can be arrived at from 8 different links. Well, depending on which link they clicked on to get to my product, I would like to show a different sidebar. In other words, 8 possible sidebars, for one particular product. I know I can easily do this with a variable in the URL and a $_GET to see which link they clicked on. Is there an easy way to do this in Concrete 5? I am thinking I may have to create some php code within the blocks, and have variables in the page links themselves.
(yes, it's just one "r" in referer -- due to a typo in the original HTTP spec way back in the day, we're stuck with the mis-spelling of that word in this context)
Do each of these sidebars need to be editable in the CMS, or is it just "hardcoded" html in the template? If it's hardcoded, you could do this:
If it's editable areas, you could put a different area in each of those "cases" instead of raw html, but you'll want to show all of them when you're in edit mode (use $c->isEditMode() to test that) so you can get to all of them for editing. Code is going to be a bit complicated -- if you're not familiar with PHP it will be somewhat of a challenge.