PDA

View Full Version : linking to the current article


SwizzleSkids
11-11-2004, 10:46 PM
I was wondering if anyone could give me the correct syntax for putting a link to the current article on the actual article page.

I'm creating a little section at the bottom of each article that will say something like "Link to this article" then give the article's url as a hyperlink (with the title as an anchor text)

Does that make sense? I'd also like to call the article summary. So it would end up looking something like this:

ArticleTitle (hyperlink)
Article Summary

I know it was something to do with calling CurrentArticle, but I don't know the exact syntax

John (Interspire Staff)
11-12-2004, 12:11 AM
Hi SwizzleSkids,

Here you go:


<a href='<%# LinkHelper.CreateArticleLink(CurrentArticle, true) %>'><%# CurrentArticle.Title %></a><br><%# CurrentArticle.Summary %>

Tell me if you have any problems with it.