9

I would like to get the filename with a core service GetListXml call. Currently my returned XML is:

<tcm:Item ID="tcm:9-26-64" Title="abc" Type="64" Modified="2013-03-27T21:27:54"
          IsNew="false" Icon="T64L0P0" 
          xmlns:tcm="http://www.tridion.com/ContentManager/5.0">
</tcm:Item>

Can I use a different filter to get the filename?

var tridionItems = client.GetListXml(
    uri,
    new OrganizationalItemItemsFilterData
    {
        ItemTypes = new[] {
            Tridion.ContentManager.CoreService.Client.ItemType.Component, 
            Tridion.ContentManager.CoreService.Client.ItemType.Page },
            Recursive = recursive
});

1 Answer 1

10

Unfortunately this information is not available in the list XML. The best you can do is set IncludeRelativeWebDavUrlColumn to true. This will give you URL column like URL="/webdav/Test/root/page.tpg". You can then split this value by / and pick the last member.

Alternatively, if you are on SDL Tridion 2013 you can use GetList method with BaseColumns = ListBaseColumns.Extended. This will give you IdentifiableObjects list which you can then cast to pages and get FileName

2
  • 1
    The WebDAVURL does not expose the file name of the page though, even though it resembles it superficially. Instead, it uses the title of the page. I think you have no alternative but to open the page itself.
    – Quirijn
    Mar 29, 2013 at 12:28
  • Yes, I am opening the pages now. It is an optional feature in the app, so won't slow it down all the time...
    – robrtc
    Mar 29, 2013 at 12:53

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.