4

I am making a ECL integration for one of our customers.

The problem I am facing now is that the tree view, the one on the left side of the CME, also shows the files in a folder and not just the subfolders.

So for example Folder1 Contains: Subfolder1, Subfolder2, File1 and File2.

The Structure that is visible on the left side is as follows

Folder1
  |__ Subfolder1
  |__ Subfolder2
  |__ File1
  |__ File2

What I expect to see is:

Folder1
  |__ Subfolder1
  |__ Subfolder2

The Subfolders implement the IContentLibraryItem interface and the Files the IContentLibraryMultimediaItem interface. The id of the folders are like ecl:6-ab-8987-accl-folder and the id of the files are like ecl:5-ab-46353-img-file.

Does any of you know what I am missing? Everything else works.

PS: The file are expendable and then show all my publications as sub folders.

EDIT: Added image for clarification about what I am talking

Tree Structure

4
  • When you configure the ECL default located in your TRIDION_HOME\config ExternalContentLibrary.xml , you set the mount point for the provider it can be you tube or vimeo having said that you specify the StubFolder folder with the tcm value and tou add other channels or Users information required to push the ecl items under the specified folder.
    – Anand N S
    Apr 14, 2016 at 13:59
  • please note that by default the ecl will create sub folders with the ID and to the StubFolders tcm value you specifiy. example ( ECL Stub Test\OEF\SDF\ecl-o-bhdgdydtehe.vid.file), let me know what feeds are you integrating so can provide you more details.
    – Anand N S
    Apr 14, 2016 at 14:11
  • Hi thanks for response, but I am not talking about the stub folder Tridion will create. I am talking about the tree option that is added underneath Categories and keywords. I added the image for clarification. Apr 14, 2016 at 14:31
  • Please provide some more info about your code. Check the value of Parent Id when you are creating ECL item from code Apr 14, 2016 at 14:55

1 Answer 1

5

When you implement

public IFolderContent GetFolderContent(IEclUri parentFolderUri, int pageIndex, EclItemTypes itemTypes)

you must support the itemTypes parameter. Notice EclItemTypes is a Flag enum.

The most efficient way to implement it will depend on your external system. Typical implementations are:

  1. The external system supports no filtering - get all children from the external system and filter in the provider based on the itemTypes flag.
  2. The external system supports filtering by type - check the itemTypes flag and set up a call to the external system that gets the right data
  3. The external system can't get folders and files in a single call. So use the itemTypes flag to determine which types you need to get from the external system, retrieve them (preferably concurrent) and combine the result.
3
  • @Thomas Hendrickx - how did it actually worked for you. In my case GetFolderContent() get fired for both CME Body section and in Left Tree and hence I see Folder and Files both in Left tree. One thing to remember that Items collected in my GetFolderContent() returns both files and folders. Basically I am having a full File structure but in left tree I only want to list Folders and not files. Mar 22, 2017 at 22:23
  • @Vikas Kumar It's in the EclItemTypes itemTypes param. I only add the item types if ((itemTypes & EclItemTypes.File) != 0). When the left tree calls the ECL, this will be false. Mar 23, 2017 at 23:15
  • Yup I got them. I actually had a different issue, my methods were returning both folders and file so these conditions were violated. But now they are fine. Mar 24, 2017 at 23:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.