Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    How do I set url parameters when a user clicks a menu option

    Cloud CMS (Pagebuilder, Blog, Shop, Newsletters, Code Editor)
    3
    5
    306
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Konrad Hylton last edited by

      Hello team,

      Appdrag has a pretty convenient tool that allows me to set URL parameters when a user clicks a link (edit>link>urlparameters). Is there a similar option for menu links? For example, every time a user clicks "dashboard" from the menu I pass their email into the URL parameters.

      Alternatively, is there a way to run a specific piece of javascript when a user clicks a particular menu link?

      Thanks

      1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim last edited by

        Hello,
        You can set it manually with custom menu items

        9b35ca8b-0ce8-4f53-ac1e-6d9c088a0ab8-image.png

        But I think what you're trying to do is not the best option.
        You should store the user email in the local storage, and check it on your page instead. Looking in the URL parameter can became insane to handle from direct links and shared links etc

        1 Reply Last reply Reply Quote 0
        • K
          Konrad Hylton last edited by

          Thank you Wassim,

          9 out of 10 times I just store the data in local storage, but one of my pages uses an embedded form script that allows information(user's name and email) to be passed to it by reading URL parameters but doesn't allow me to pass data to it by altering the form's HTML properties.

          Would I be able to pass dynamic data this way through a setup similar to the image attached? Screenshot 2020-09-07 at 11.11.25 AM.png

          1 Reply Last reply Reply Quote 0
          • Wassim
            Wassim last edited by

            @Konrad-Hylton said in How do I set url parameters when a user clicks a menu option:

            9 out of 10 times I just store the data in local storage, but one of my pages uses an embedded form script that allows information(user's name and email) to be passed to it by reading URL parameters but doesn't allow me to pass data to it by altering the form's HTML properties.

            Yes this way should work, but unless you use URL Rewriting it's more test.html?email=[DS1=email]

            1 Reply Last reply Reply Quote 1
            • Daniel Mulroy
              Daniel Mulroy last edited by

              Nice use case @Konrad-Hylton !

              1 Reply Last reply Reply Quote 0
              • First post
                Last post