2

My Question is How we can add parameters to a Sitecore URL. any help is appreciated

example: example.com/insights/blogs/?category=Skaitmeninė%20transformacija

6

for example if you want to add query string to current item you can use :

var url=LinkManager.GetItemUrl(Sitecore.Context.Item);
string urlQS = WebUtil.AddQueryString(url, "category", "Skaitmeninė transformacija"); // "http://www.mysite.net?print=1"

Update:

If you want to add from Sitecore you can use General Link field. In your code you will have next lines to render with query string:

enter image description here

 var linkField = (LinkField) Sitecore.Context.Item.Fields["Link"];
 var url=linkField.GetFriendlyUrl(); 
| improve this answer | |
  • Thank you @sitecore Climber, is there a way to do it in Sitecore itself rather in coding? – Sudhakar_Mangalarapu Sep 22 '17 at 8:19
  • I updated my answer – Vlad Iobagiu Sep 22 '17 at 8: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.