> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: siteLocation.add(toAdd: object) # Method Link: https://dev.wix.com/docs/sdk/frontend-modules/location/query-params/add.md # Method Description: Adds query parameters to the current page's URL. Adds one or more query parameters to the current page's URL. The `add()` method can only be used when browser [rendering](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/frontend-code/page-rendering/about-page-rendering.md) happens, meaning you can only use it in frontend code after the page is ready. If a specified key already exists as a query parameter, the newly specified value overwrites the key's previous value. Calling the `add()` method triggers `onChange()` if it has been registered. > **Note:** To retrieve the page's current query parameters, use the `query` method. # Method Permissions: # Method Permissions Scopes IDs: undefined # Method Code Examples: ## Add query parameters to the URL ```javascript import { queryParams } from '@wix/site-location'; // ... queryParams.add({ "key2": "value2new", "key3": "value3" }); // URL before addition: // www.mysite.com/page?key1=value1&key2=value2 // URL will look like: // www.mysite.com/page?key1=value1&key2=value2new&key3=value3 ``` ## Add, update, remove, and get URL query parameters ```javascript import { queryParams } from '@wix/site-location'; $w.onReady(function () { $w("#addButton").onClick((event) => { const key = $w('#addKey').value; const value = $w('#addValue').value; if (key && value) { const toAdd = { [key]: value }; queryParams.add(toAdd); $w('#addKey').value = undefined; $w('#addValue').value = undefined; } }); $w("#removeButton").onClick((event) => { const paramToRemove = [$w('#removeKey').value]; queryParams.remove(paramToRemove); $w('#removeKey').value = undefined; }); $w("#getButton").onClick((event) => { const query = queryParams.query(); if (query) { $w('#getText').value = JSON.stringify(query, null, 2); } }); }); ```