I recently deployed a KiGG site, but I wanted it to act more like DZone than DotNetShoutOut. On DotNetShoutOut, if you click the link from any of non-detailed page views, it takes you to the site. DZone will take you to the detailed view of the story, and if you click the link from there it will take you story’s site. The reason for this change is that I want my site to foster the community: more comments and viewing promoters. Eventually, I would like to code up a friend system for KiGG similar to DotNetKicks friend system, and I feel that seeing who promoted a story will grow more connections between those in the community.
Here’s how you can implement viewing the detailed story. In your KiGG 2.2 release codebase, open up Kigg.Web\Views\Story\Story.ascx. On line 132, you will find the declaration for detailUrl.
<% string detailUrl = Url.RouteUrl("Detail", new { name = story.UniqueName }); %>
Cut this and paste it immediately after the table tag on line 99. Then, replace the first td’s content with the following snippet of code.
<% if (Model.DetailMode) %>
<% { %>
<h2><a class="entry-title taggedlink" rel="bookmark external"
href="<%= Html.AttributeEncode(story.Url) %>" target="_blank"
onclick="javascript:Story.click('<%= attributedEncodedStoryId %>')">
<%= Html.Encode(story.Title)%></a></h2>
<% } %>
<% else %>
<% { %>
<h2><a class="entry-title taggedlink"
href="<%= Html.AttributeEncode(detailUrl) %>">
<%= Html.Encode(story.Title)%></a></h2>
<% } %>
That’s it: simple change! I think it would be better to make this configurable and submit it to the project. I may do that when I have more time to sift through the codebase.