Skip to main content
added 4 characters in body
Source Link
Nickoli Roussakov
  • 18.4k
  • 4
  • 31
  • 62

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the Component that you're linking to. You'll then need to:

  1. For the Pages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-F9F52365-2ABE-4C1E-A50C-3D4CA4F84989). This might be tough/a lot of code. If, though, you only have 1 page your component is on, then this is easy as there is only one choice.
  2. For each Component that uses this Component, do recursion.

As far as how to get a published path of a Page, there is a property called PublishUrl on each Page object. Just make sure the Page is published to the Publication Target of the current publishing Session.

You may want to rethink yourconsider another approach and perhaps move the "HTML Document" generation logic to the Content Delivery side. This would allow you to leverage OOTB features such as Dynamic Linking with REL and OData to pull fully rendered plain HTML documents, which you can further transform into a PDF.

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the Component that you're linking to. You'll then need to:

  1. For the Pages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-F9F52365-2ABE-4C1E-A50C-3D4CA4F84989). This might be tough/a lot of code. If, though, you only have 1 page your component is on, then this is easy as there is only one choice.
  2. For each Component that uses this Component, do recursion.

As far as how to get a published path of a Page, there is a property called PublishUrl on each Page object. Just make sure the Page is published to the Publication Target of the current publishing Session.

You may want to rethink your approach and perhaps move the "HTML Document" generation logic to the Content Delivery side. This would allow you to leverage OOTB features such as Dynamic Linking with REL and OData to pull fully rendered plain HTML documents, which you can further transform into a PDF.

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the Component that you're linking to. You'll then need to:

  1. For the Pages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-F9F52365-2ABE-4C1E-A50C-3D4CA4F84989). This might be tough/a lot of code. If, though, you only have 1 page your component is on, then this is easy as there is only one choice.
  2. For each Component that uses this Component, do recursion.

As far as how to get a published path of a Page, there is a property called PublishUrl on each Page object. Just make sure the Page is published to the Publication Target of the current publishing Session.

You may want to consider another approach and perhaps move the "HTML Document" generation logic to the Content Delivery side. This would allow you to leverage OOTB features such as Dynamic Linking with REL and OData to pull fully rendered plain HTML documents, which you can further transform into a PDF.

added 566 characters in body
Source Link
Nickoli Roussakov
  • 18.4k
  • 4
  • 31
  • 62

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter)IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the componentComponent that you're linking to. You'll then need to:

  1. forFor the pagesPages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-F9F52365-2ABE-4C1E-A50C-3D4CA4F84989). This might be tough/a lot of code. If, though, you only have 1 page your component is on, then this is easy as there is only one choice.
  2. forFor each componentComponent that uses this componentComponent, recursedo recursion.

As far as how to get a published path of a Page, there is a property called PublishUrl on each pagePage object. Just make sure the Page is published to the Publication Target of the current publishing Session.

You may want to rethink your approach and perhaps move the "HTML Document" generation logic to the Content Delivery side. This would allow you to leverage OOTB features such as Dynamic Linking with REL and OData to pull fully rendered plain HTML documents, which you can further transform into a PDF.

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the component that you're linking to. You'll then need to:

  1. for the pages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs. This might be tough. If, though, you only have 1 page your component is on, then this is easy.
  2. for each component that uses this component, recurse.

As far as how to get a published path of a Page, there is a property called PublishUrl on each page.

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the Component that you're linking to. You'll then need to:

  1. For the Pages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20full%20documentation-v1/GUID-F9F52365-2ABE-4C1E-A50C-3D4CA4F84989). This might be tough/a lot of code. If, though, you only have 1 page your component is on, then this is easy as there is only one choice.
  2. For each Component that uses this Component, do recursion.

As far as how to get a published path of a Page, there is a property called PublishUrl on each Page object. Just make sure the Page is published to the Publication Target of the current publishing Session.

You may want to rethink your approach and perhaps move the "HTML Document" generation logic to the Content Delivery side. This would allow you to leverage OOTB features such as Dynamic Linking with REL and OData to pull fully rendered plain HTML documents, which you can further transform into a PDF.

Source Link
Nickoli Roussakov
  • 18.4k
  • 4
  • 31
  • 62

To resolve your Tridion Component Links on the CM side you're on the right track: use the IdentifiableObject.GetUsingItems(UsingItemsFilter) method on the component that you're linking to. You'll then need to:

  1. for the pages returned, figure out which page to link to. If you want to mimic the Dynamic Linking algorithm then you'll need to do proximity logic as described in the SDL Tridion docs. This might be tough. If, though, you only have 1 page your component is on, then this is easy.
  2. for each component that uses this component, recurse.

As far as how to get a published path of a Page, there is a property called PublishUrl on each page.