I am trying to list the related docs for a document but I'm not having any luck, and I'm not sure if what I am doing is wrong or I am misunderstanding how the related docs feature works.
I have a document set up that has two documents related to it. The document is on the left side, and the two documents related to it are on the right side. The name of the relationship is "is related to" which seems to be the only option.
I have looked at the relateddocuments web part and tried using it, but it did not work. I now am using the CMS.TreeHelper.GetDocuments() call from the web part directly in my template, and that is not returning any data. Here is what I am using currently:
DataSet ds = TreeHelper.GetDocuments(
CMSContext.CurrentSiteName, // siteName
"/%", // aliasPath
CMSContext.CurrentDocument.DocumentCulture, // cultureCode
true, // combineWithDefaultCulture
"", // classNames
"", // where
"", // orderBy
-1, // maxRelativeLevel
true, // selectOnlyPublished
CMSContext.CurrentDocument.NodeGUID, // relationshipWithNodeGuid
"", // relationshipName
false, // relatedNodeIsOnTheLeftSide
-1); // topN
I have tried using different values for some of the parameters, and specifying class names, but nothing has worked for me.
If I simply want to list all of the related documents for the CMSContext.CurrentDocument node, what am I doing wrong?
Thanks in advance.