function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sean*harrisonsean*harrison 

Customizing PKB - access to article data and page

We're customizing the layouts of the public knowledge base site to display Knowledge Articles but have hit a couple snags.

 

First, I need to put the title of an Article (or some portion thereof) in the <title> of the html display. I can't find anywhere in the controller (KnowledgeController.cls) to access any information about the current Article being displayed.

 

Similarly, the styling around the Article needs to be adjusted but I can't find the page I need. I see the layout (knowledgeLayout.page) and the pages for Home, Product and Search. Where's the "knowledgeArticle.page"?

Best Answer chosen by Admin (Salesforce Developers) 
FrancoisLptxFrancoisLptx

Hi,

 

Today, the only way to have what you ask for is to develop your own VF page to display article in PKB environment. 

 

An example of code will be:

<apex:page title="{!FAQ__kav.title}" standardController="FAQ__kav">
<h1>{!FAQ__kav.title}</h1>
<br />
{!FAQ__kav.id} <br />
{!FAQ__kav.Content} <br />
</apex:page>

All Answers

FrancoisLptxFrancoisLptx

Hi,

 

Today, the only way to have what you ask for is to develop your own VF page to display article in PKB environment. 

 

An example of code will be:

<apex:page title="{!FAQ__kav.title}" standardController="FAQ__kav">
<h1>{!FAQ__kav.title}</h1>
<br />
{!FAQ__kav.id} <br />
{!FAQ__kav.Content} <br />
</apex:page>
This was selected as the best answer
sean*harrisonsean*harrison

Thanks, Francois. That makes sense to me. Allow me to follow up with a real elementary question but where do I go to discover what fields and methods are exposed by the FAQ_kav controller?  Is this the best place to start [ http://www.salesforce.com/us/developer/docs/api/index.htm ] ?

 

Also, I notice there are some knowledge components (custom tags) floating around. Where are the docs for those published?