18 Jul 2012
20 Jan 2009
Link to this post
let me try and see if I understand what you've got here. It sounds like you are saying that you have a newslist on your homepage which has a short list of links to news items. Then you also have another page say /news.aspx which ALSO has a list of the same news items, except perhaps slightly expanded with maybe a summary... BOTH of these pages link to yet another page say /newsarticles.aspx which displays the full details for a single news item that comes from either the homepage or the news.aspx page. this means that whenever you link to a single news item you get /news/newsarticle/thenewsitem.aspx when what you want is news/thenewsitem.aspx
do i have that right? I actually did this exact same thing with my blog, before it was /blog/post/posturl, and I changed it to be blog/posturl
if this is what you're trying to do then what you need to do is change BOTH the news.aspx and the homepage so that it links to the NEWS.ASPX for news items, instead of the newsarticle.aspx. the news.aspx should have a NewsView control, and this control is capable of rendering as both the news list AND the single news item depending on the link that is served to it. which means the newsarticle.aspx page is not necessary.
go into the newsview and edit the properties so that it is in List & Page mode, then go advanced tab and under Explicit Links make sure that both the news.aspx and homepage point to news.aspx for the singleItemurl. Also make sure that the newsview behavior is set to auto so that it can switch modes based on if it's showing a list or a single item.
now by the way you should know however that this will change the structure of your site. I do'nt know if you had this but I had it as blog/default.aspx. in order for me to get it to the way I have it now, it had to become blog.aspx. which means if people are linking to blog/default.aspx, they will get a broken link, because the correct page is blog.aspx. there is a workaround for this which is to add a default.aspx page a subpage of your news.aspx and make it an exact copy of news.aspx (that is put a news view on it and link it to news.aspx), that way if anyone did link to your old news page as a subdirectory, they won't have any broken links...
I hope that this information was made sense and was helpful (and correct!)