I'd like an accordion menu on page 1 to control the text/widget that's displayed on page 2

newbie-question

#1

That is, the user chooses a topic from an accordion on the first page, and the selection determines which of 5 widgets is displayed on page 2.

Is this possible? What’s the best way to do this? Each accordion list item on page 1 would link directly to page 2. I was wondering if the pageload event on page 2 could have conditional logic, something like: if option #3 is selected on page 1, display panel/widget/text #3 on page 2.

Would that work? Is there a better way?


#2

Yes - you could do this with Global Variables. Create a global variable like SelectedItem, then store a number or value (say, ‘Widget1’) in the variable, then navigate to page 2.

On page 2, check what the global variable is using a ‘Page Loaded’ interaction, then set a dynamic panel or use show/hide to display your preferred widget of the five.


#3

Works great! Thanks 1,000,001.

Here’s the next problem: I’m trying to use the same variable to control which button appears SELECTED in the left column of the second page. An alternate strategy would be fine! Can you or anyone help?

I thought maybe I should make a dynamic panel of the three buttons, and have three states, each with a different button displaying as “selected”. No luck so far.

https://aax38n.axshare.com

(see attached file)

variabletest3.rp (82 KB)