Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list filled with news, and i have a page that depending on the query string I pass (list item ID), it shows the news. The thing is, when i search for this news, it retrieve the list item, and i would like to, instead of showing /lists/news/DispForm.aspx?ID=11 page, show /pages/news.aspx?ID=1 as default, and not redirecting. I'm filling the page with c# code from the layout (in case it changes anything)

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You could create a Display Template for the News Content Type that performs the URL rewriting.

share|improve this answer
    
Thank you, although i didn't follow you suggestion, i did something quite similar, I edited the Item_Default.html file, and with a few IFs I got the functionality i wanted, so +1 for pointing me on the right direction –  Pedro Pertino Apr 21 at 18:45
    
OK, though usually you want to leave the defaults alone and create your own Display Template for specific use. Glad it helped though. –  Matthew McDermott Apr 21 at 21:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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