On Toggle Tabs page template, how to keep current static tab text on refresh or when linking

I am currently using the Toggle Tabs page to display a tab and a group conditionally. That works great! However, when I am on a tab and refresh the page, I would like to keep the user on the current tab. I would also like to be able to send users to a tab on this page from another page and set the tab to something other than the default.

I am using static choices with a default static option that continues to override any settings I attempt to pass on page load. I am attempting “When page is loaded” “Trigger Navigate Toggle Tab” and passing the current url parameter’s text to “sitetab” value in the corresponding custom event, to no avail. The default static choice is always where it redirects. Am I missing something? Thanks!

Update: I solved it “half way” by removing the default static value. This allowed for the “deeplinking” behavior to work. Then I created a new workflow that checked first to see if a tab param existed and if it didn’t then I set it to the default tab. I still can’t figure out how to trigger the “active” state on the tab itself when the page loads a non-default static option.

Hello @dstepchew welcome to the forum

Use the debugger to pinpoint the issue. Check other elements installed on the page that may be triggering the redirection (header or other reusables that may have logic that is disrupting your desired behavior)

Hi @cmarchan - if you read my update you’ll see that I solved the first issue of the redirection, but now I have a separate issue that I cannot solve using the debugger. The CanvasTabs sitetabs is clicked workflow has no action to set the current tab to active, other than what looks to be custom javascript or something I don’t have access to. Is there a way to trigger the ‘active’ state on the corresponding sitetab without a click? I.e. when the page loads and tab=X?

Hello @dstepchew

  1. Please make sure that the plugin is updated to version 2.9.0

  2. Make sure that it is visible

  3. And this is where you can set the dynamic active tab

Hi @cmarchan - I had 1 & 2 set but I also had “use static texts” option checked, but when I entered a static option for the default value below the static texts, this was the source of the original issue. So instead I turned off “Use static texts” and created an option set for “site tabs” with text attribute as “title.”

That worked! The last step was to update the workflow action “display data” on the var - tab url parameter elembent to use dynamic data instead of static.

Thanks for the hints! Hopefully this helps others in my situation.

1 Like