I want to append a querystring which will have the value of current page's GUID when somebody clicks on a link. URL should look like:

https://some redirected url ?sc_itemid=139C9F7D-55A7-4065-9D7A-1958B3E41111

. Please let me know the best way to achieve this. Is this possible without coding?

  • Without code, your only option is to make the content editor add this to the query string field on the Link properties. – Richard Seal Apr 16 '19 at 10:52

You can do it by changing the Rendering Variant for the Link rendering. Create your custom one and use Variant Template item there. Something like this:

enter image description here

Which will generate following HTML:

enter image description here

  • The id coming here is not of the current page. How do I get the ID of the current page? – Niti Chauhan Apr 16 '19 at 11:42
  • It is not the ID of the current page but the ID of Link rendering data source. Do you need this for navigation? If yes use Navigation rendering which will generate links to the actual pages (not data source items). But if you still want to go with Link and have a link to the page you have two options: implement Variant Token or add new variable which can be used in Variant Template (both approchases requires custom implementation). – Dawid Rutkowski Apr 16 '19 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.