The Problem

While editing an article in the Edit Interface (EI), a user has the ability to attach different types of content through the Internal Links section on the Connections / Statistics tab. While it is easy to attach the items, it isn’t quite clear how to display them on the page. I was working on a project that involved connecting the types story and CCE to an article, I am going to go through my approach to solving this, as well as what ended up being the solution.

 

 

 

The attached Story items and CCE items in the Edit Interface.

The attached Story items and CCE items in the Edit Interface.

I had an article page, that contained a Related Links section that listed other stories related to the current article. I also had to attach custom .jpg ads that I had created using CCE, to the 4 smaller spots in the right column.

 

The Approach for Attaching Internal Link Stories

The file structure for Related Links is:

gen_article.pbs holding an article tag <pbs:article > which calls Article.pbo.

Article.pbo with the <%ConnectionItems%> variable.


ArticleConnections.pbo with the <%ConnectionItems%> variable.


ArticleConnectionItem.pbo which contains <%Link%> and <%Heading%> which I use to create the links.


This is pretty straightforward and the related links appear on the article as expected.

The Approach for Attaching Internal Link CCE Objects

I then went to Saxo docs to find how to differentiate the attached CCE items from the attached story items that I just displayed https://docs.saxotech.com/display/Onl/ArticleConnections.pbo

The documentation shows three variable available on ArticleConnections.pbo:

Outputs the story items. 

Outputs the forum items. 

Outputs the photo gallery items.   

<%ConnectionItems%>
<%ForumConnectionItems%> <%GalleryConnectionItems%>


After doing some testing I found that none of these variables would output CCE items. I then, try and use <%CCEConnectionItems%> thinking maybe this variable is available but not documented yet. This also does not work. I am officially stumped at this point.

The Approach that Worked for Attaching Internal Link CCE Items

While I would like to say that I figured out the solution myself, I totally cheated and put in a ticket with Saxotech/Newscycle.

I was told that the best way to attach the CCE items is to use a contentlist tag on the article.pbo file, with the most important parameters being linkguid, linkdirections and types.

From https://docs.saxotech.com/display/Onl/pbs+contentlist

What types of content to extract. For now the following content types are supported: stories (stories), Photo galleries (galleries), and CCE objects (CCE). By default all are extracted.

Types

 

<pbs:contentlist types="stories,galleries,cce">

 

 

 

 

 

 
LinkDirections
You can output items being “children”, “parents” or a comma separated list of them to specify the exact characteristics of the link filter “linkguid”. Default is “children, parents”.

<pbs:contentlist linkguid="<%ItemGUID%>" linkdirections="children" />

 

 

 

 

 

 
LinkGUID
A filter on links to the contentitem with the given GUID. See parameterLinkDirectionsfor providing exact characteristics of the link (parents and/or children) in relation to the contentitem with the given GUID.

<pbs:contentlist linkguid="<%ItemGUID%>" linkdirections="children" />

 

 

 

 

 

 


On Article.pbo, in the place I want to the connected CCE ads to go, I add the tag

To break down the necessary parameters in the tag used to return the cce items:

  • linkguid=<%GUID%> works with linkDirection to filter the attached internal link item. <%GUID%> is the variable available in Article.pbo that contains the article ID.
  • linkDirection=children filters the attached internal link children of the article.
  • types=cce returns attached CCE items on the article.

 

Here is the Successful File Structure of the Attached CCE Items.


gen_article.pbs holding an article tag <pbs:article > which calls Article.pbo.

Article.pbo contains the contentlist tag mentioned above.

ContentList.pbo calls the CCE items.



ContentListItem.pbo displays the CCE ads on the page.



The Related Links are now showing correctly on the page using the connectionItem variables and object files, while the CCE items are now showing correctly on the page using the pbs:contentlist tag along with the contentlist object files. I would also like to point out, after going through this process, I realized that contentlist can also be used to output the story links by changing the type from cce to stories. I am not aware if using pbs:contentList is better or worse practice than using <%connectionItems%> on Article.pbo to display internal story links. If anyone has information on this, please feel free to share in the comments below.