3

I have a Query String (URL) filter on my SharePoint 2013 page that is currently passing a string parameter which I then use to filter a list. This list is displayed in a view on my web part page. I want to add a "Title" object above my list view to show the value of the filter parameter that I'm passing to filter the list.

Does anyone know how I can do this? I looked through the web part options that were available to add, and couldn't find one to simply display the result of the query string filter.

  • Use GetUrlKeyValue('queryStringParamKey') javascript method to get the value. – sekhar Aug 7 '15 at 14:06
1

So, continuing from @sekhar's comment above, I added a Script Editor below the Query String (URL) Filter with the following contents:

Region: <span id="RegionSpan"></span>
<script type="text/javascript">
var region = GetUrlKeyValue('Region');
var span = document.getElementById('RegionSpan');
span.innerHTML = region;
</script>

This worked for me.

1

It depends where you want to put the title. If you want to put it at the main title of the aspx, open it in the advanced mode. Look for the PlaceHolderPageTitle and customize the body of it. In my case in order to have a link on the page itself and print an Url-Parameter I did:

<a href="">
    <script language="javascript"> document.write('Aufgaben ' + GetUrlKeyValue('Urlparameter'));</script>
</a>

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.