2

Is there any property or method to get the list of child publications of a particular publication using core service?

Thanks, Jey

  • 1
    Yes, there is tridion.stackexchange.com/questions/4988/… – Andrey Marchuk Mar 13 '15 at 9:13
  • I have cheked the post. when i pass the Publicatio ID/webdav url. It throws an error as "Publicatin" type not expected. – Jey Mar 13 '15 at 9:16
  • 2
    Please update your question with the code snippet you tried. And the error you are getting. – Saurabh Gangwar Mar 13 '15 at 9:30
  • I'd wager that in that's because the post uses filter.ForItem (i.e. page/component) where you need to use filter.ForRepository for the publication? – Dave Forber Mar 13 '15 at 15:09
1

As per my answer in this previous question, "Where Used" is your friend.

client.GetList(publicationId, new UsingItemsFilterData());

gives you a list of items which "use" the publication, i.e. it's children.

The list will include all of the descendant publications. If you want only the direct children then you can loop over each publication in the list and check it's parents. See my other answer for an example of how to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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