I am trying to create a VisualForce page where I display our articles in a tree like structure.

There are only 2 levels in the tree, so like:





There are about 10 categories of level 2.

I tried using the <knowledge:articleList> for each level of the tree, but this tag can be used up to 4 times on a page.

Then, I tried extracting all articles in my controller:

SELECT Id, Title, KnowledgeArticleId FROM KnowledgeArticleVersion WHERE PublishStatus ...

And it works fine, the only thing that doesn't is the actual link to the article, I do:

<apex:repeat value="{!controllerArticles}" var="article">
    <a href="{!URLFOR($Action.KnowledgeArticle.View, article.id)}">{!article.title}</a><br/>

And when I go to the page it get the Unauthorized page. It's weird cause when I use the <knowledge:articleList> with the {!URLFOR($Action.KnowledgeArticle.View, article.id)} it works fine and I see the links correctly.

Does URLFOR($Action.KnowledgeArticle.View) action work only inside the <knowledge:articleList> ? If so, how can I create a link to an article?

Thank you.

  • By any chance do you have this in a public site? I will be working on something similar and I am looking for ideas. Thanks.
    – PepeFloyd
    Commented Nov 15, 2012 at 22:56
  • @PepeFloyd, sorry I don't. Commented Nov 16, 2012 at 19:17

2 Answers 2


I found how to display a link to the Article.

<apex:repeat value="{!controllerArticles}" var="article">
    <a href="{!$Site.CurrentSiteUrl}articles/Article_Type/{!article.urlName}">{!article.title}</a><br/>

Two things to check:

  1. Have the users in question been grated access to view articles by way of their user profiles?
  2. Does the page work without error when run as yourself? Often with portal/sites pages, you'll get the 'unauthorised' notification when there has been an error and you're redirected to the internal-only error details page

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .