0

I have a lot of components in my parent publications, After doing some modification through core service, I need to publish the component from related web application. So I have the tcm id of a component from parent publication or content publication you can say, Now I need a method by which I can fetch the same component id of web application. Please share your ideas or logic or code.

2

If I get your question right, You can use below function to get the local id of the component:

tridionClient.GetTcmUri(objectID, publicationID, null);
2
  • I have this solution but i need a kind of resolver method by which I can get web publication tcm without sending the publication id because I am looking for a generic solution .I know the tcm uri of web publication but My code don't know thatI have a kind of code to get all the publication ui and dua foreach but it will be a bad solution – Asahajit Jun 8 '15 at 18:53
  • Hi Jeet Idealist, Sorry I am not getting your question. To get a good answer please explain your problem editing the question. – Saurabh Gangwar Jun 8 '15 at 18:59
0

One way to achieve this is using search API:

        SearchQueryData query = new SearchQueryData()
        {
            ItemTypes = new ItemType[]
            {
                ItemType.Component
            },
            IncludeLocationInfoColumns = true,
            SearchIn = new LinkToIdentifiableObjectData()
            {
                WebDavUrl = "<WebDav Url of child publication>"
            }
        };
0

You may want to explore the configuration and code for WF4T (point 8) In it I am capturing the content being edited (which is most ideally in the Content Publication) and then it has to be auto published from one or more Web Publications, value of which I am retrieving from a managed mapping of Content and Web Publications in the XML configuration file.

This is one option I have been using the WF4T, you may further think in this direction of managing this mapping through Publication Metadata or a Specific component created in the Root/Master Publication etc.

Also, in any scenario, I would recommend using the WebDav path where ever possible instead of the TCM URI

0

Do you want to publish the component in a specific publication? Or in all publishable child publications? Or only some? And to which publication targets (or target types)?

Is there a fixed rule that maps a modified component to a (set of) combination(s) of a publication target and one or more publications? Or does that set vary by component?

If all you really intend to do is find the blueprint children of the component then the method you are looking for is

CoreServiceClient.GetListXml(tcmUriOfComponent, new BluePrintChainFilterData(BluePrintChainDirection.Down));

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.