Pricing Blog

dynamic URLS, hiding elements.

  • lfggjonesy-1442226163538727025

    Jonesy

    6 days ago

    I have a webpage that has sub category tabs like Overview, Maps, Modes etc. My current url is setup myurl.com/statline/:player/:category.

    Right now i can get the URL to switch to what i need it to for example. myurl.com/statline/scrap/overview. My question is how can hide elements based off the URL or change styles of elements from the URL like a border or color of something?

    Thank you in advance
  • lucasg-1442280363899621584

    Lucas G

    6 days ago

    Use page parameters to control things
    1442280363685838899-image.png
    🔥1
  • lfggjonesy-1442576668408418395

    Jonesy

    5 days ago

    Okay, and use the show/hide to hide an element? Im guess through an “if”statement?
  • lucasg-1442578579559944213

    Lucas G

    5 days ago

    Likely just a simple Equals node
  • ie., player equals scrap
  • lucasg-1442578933571911731

    Lucas G

    5 days ago

    And for styles you can pass the parameters as attributes into your component or expose them via contexts
  • Then use style variables
  • lfggjonesy-1444148021964050513

    Jonesy

    1 day ago

    I was able to get that stuff working thank you. I do have another question. I am using a dropdown with repeating options set dynamically. I have it when i click an option it is supposed to set the mode in the url parameters to that mode. But i cant get that to actually work. Am i missing something
    1444148021779763292-Image_11-28-25_at_9.04_PM.jpeg
  • lucasg-1444182760984940544

    Lucas G

    1 day ago

    Hard to say with just that bit
  • Make sure it’s a string
  • Console log it to see what’s being passed in and what the workflow is receiving/executing
  • lfggjonesy-1444385915396034632

    Jonesy

    11 hours ago

    I guess something kinda odd. I opened the page in a firefox browser and works as intended. On chrome it doesnt update the URL at all.

    Now in the console Log in Chrome no errors populate. But in firefox i do get a error everytime that i select a mode within the dropdown.
    1444385914708164658-image.png
    1444385915035189299-image.png