Set two path parameters at once: two slashes at the end

  • ssssadsadasd

    16 days ago

    I have three path parameters: tab1, tab2, tab3. So my url is sth like: https://start.toddle.site/tab1/tab2/tab3

    When clicking a button I want to go to url: https://start.toddle.site/tab1/ so remove the last two path parameters. To do so I create an event on a button and then do: set tab2, set tab3 -> to empty. However, the resulting url is https://start.toddle.site/tab1// so two slashes at the end. I want only one. how can i achieve this? thanks (see [this](https://toddle.dev/projects/turquoise_o_en_lars_permanent_chicken/branches/start/components/test?leftpanel=design&rightpanel=events&canvas-width=867&canvas-height=800) as an example)
    โœ…1
  • Bas Fenix

    15 days ago

    cant you make it an old school ahref and use relative links?
  • ssssadsadasd

    15 days ago

    @Bas Fenix using the "set: path parameter" action does not refresh the page while the "go to url" action does
  • gazinhio

    15 days ago

    Try setting the extra path params to null rather than to empty strings.
  • ssssadsadasd

    15 days ago

    @ that sets the path parameters as notifications/null/null
  • gazinhio

    15 days ago

    Are you using the Null static value rather than the string of "null"
  • Bas Fenix

    15 days ago

    i meant like this: <a href="../../">Back to Tab1</a>
  • /attachments/1323217187212754965/1323278935399731220/image.png

    ssssadsadasd

    15 days ago

    @ yes this works thanks ๐Ÿ™‚
    image.png
    ๐Ÿ‘1
  • ssssadsadasd

    15 days ago

    @Bas Fenix I am not sure if that works honestly (not sure whether the page is refreshed or not) but I would like to keep as much toddle native as i dont know much about coding (I use no-code). thanks anyway
  • Bas Fenix

    15 days ago

    yes its just a link the user would click, <a> html the ../.../ just says go 2 layers up from current url, and the page would reload
  • happy u got it working anyways

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code โ€” but accessible to your entire team!

Try toddle โ€” it's free!

ยฉ Copyright 2024 toddle. All rights reserved.