Hello, I am building a single page app and placing reusable elements(RE) holding various navigation sections inside of each RE. 1 RE holds a user profile(name this RE1), another RE holds the news feed ( RE2). Both elements are on the home page.
I have a button inside RE1 to open RE2.
How can I make the button, inside RE1, hide RE1 and then show RE2?
You can use the trigger / antenna plugin or use states and âwhen a condition is trueâ to trigger actions.
Could you give me an example of what you mean regarding âwhen a condition is trieâ to trigger the action? Thanks. And I will also look into the plugin.
Paul B.
Best would be to use url parameters.
An example:
Index page has both RE1 and RE2. They are not visible on page load. Conditionally show them when url parameter has a certain value. Letâs say, RE2 is visible when url parameter âtabâ = ânews-feedâ. When user clicks on a button in RE1, update the page parameter.
This will make it a more scalable solution and easy to manage.
Hope this helps!
Animisha
Thanks Animisha,
I went with the Do when conditions are true method. I think I am getting the same scalable effect using custom states and being sure to label the atates correctly. If I run into a situation where I need to send data between the REâs, I may go with your idea. So thanks for your input!
Much appreciated 
1 Like