2

I need to develop an application that extracts all the contents in Content Tab of the Ektron Workarea and I have to keep tree structure of folders (taxonomies,collections,forms,etc.) also.When I click the content I need to get the Content ID in the code behind also.I need to do all these in a single function.

I tried this requirement with the concept of content block widget in workarea.When we drag that widget and edit it a pop up will come and it displays the folders of work area in tree structure.But when I created an aspx page, put the same code and I browse that page I didn't get the tree structure of all contents.Only the main tabs(Folders,Taxonomies and search ) are visible.Then I drag the user control in the aspx page .But it also doest work.

So how will I solve the above problem.

Can I pull all the contents in tree structure from work area from the root using API codes?.Then can anyone please give the API code to solve?

Please anyone reply!

1
  • If you're asking for API code, you need to specify which version of Ektron you're running.
    – egandalf
    Feb 15, 2013 at 17:31

2 Answers 2

0

Assuming you are using 8.6 look here to start with: http://reference.ektron.com/developer/framework/content/contentmanager/getlist.aspx

0
0

Update:

I think I misread your question the first time around. Allow me to expand on my answer a bit. My original answer with the web services assumes that you are rendering the content tree from some sort of "presentation tier" -- a different web site, a console app, or a WPF/WinForms app, etc.

You can get the recursive folder structure with something like this:

private FolderData GetFolderWithChildren(long folderId)
{
    var folderApi = new Ektron.Cms.API.Folder(); 
    var folderData = folderApi.GetFolder(folderId);

    // This next method is marked as obsolete in v9.0;
    // a newer overload is available in v9.0, but I
    // don't know if it's available in v8.0
    folderData.ChildFolders = folderApi.GetChildFolders(folderId, true);
}

I'm a little confused as to what exactly you're trying to accomplish. If you want to show the entire tree structure graphically, have you tried taking the code and markup from the edit view of the content widget and using it on your non-edit view?

I must say, your requirement that "I need to do all these in a single function" worries me a bit. Workarea content trees can get really large very quickly. If you're trying to load all of the folders and all the taxonomies and all the collections, etc. Then the user will likely be waiting a long time for the page to load, and you risk running into timeout issues.

-- Original Answer --

Ektron v8.0 doesn't have the 3-tier option, which is too bad because that would really make your job a lot easier. In v8.0, there are ASMX web services that you can reference, including:

  • /workarea/webservices/content.asmx
  • /workarea/webservices/webserviceapi/user/user.asmx

There are lots more than this; browse through the folders within /workarea/ to see what's available.

It's been a while since I've worked with these services, so I'm a little rusty...

Suppose you add references to those two services I listed above and name them ContentService and UserService. The first thing you'll want to do is set the authentication headers. Then you can call the service methods in much the same way as the old legacy apis.

    var contentApi = new ContentService.Content();
    contentApi.AuthenticationHeaderValue = new ContentService.AuthenticationHeader();
    contentApi.AuthenticationHeaderValue.Username = username;
    contentApi.AuthenticationHeaderValue.Password = password;
    contentApi.AuthenticationHeaderValue.Domain = domain;

    var userApi = new UserService.User();
    userApi.AuthenticationHeaderValue = new UserService.AuthenticationHeader();
    userApi.AuthenticationHeaderValue.Username = username;
    userApi.AuthenticationHeaderValue.Password = password;
    userApi.AuthenticationHeaderValue.Domain = domain;

    var ud = userApi.GetUserbyUsername("jimmy456");

    long folderID = 85;
    bool recursive = true;
    ContentData[] folderContent = contentApi.GetChildContent(folderID, recursive, "content_id");

Your Answer

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

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