3

This is a follow-up to this question: Component linked to Page Meta is resolved to lowest page ranked inside Structure Group

Are Components referenced by Page Metadata considered in Content Delivery (Dynamic) Component Link resolving? I guess this should assume such Components are dynamically published as well.

I understand dynamic link resolving is based on:

  • Template priorities (Never link, low, medium, or high)
  • Proximity (Published) Component Presentations embedded in Tridion pages (starting from the source page)
  • Uses published date in case of proximity ties

The use case I'm trying to understand is if it's okay to link to "SEO" components referenced in Tridion page metadata.

Update--here's an example content model for clarification:

  • Example Page's metadata links to Example "SEO" Component, which is not in part of the page's Component Presentation
  • SEO Component details don't matter, but it has a 1:1 relationship to pages
  • Link List Components link to one or more Example SEO Component and others
  • The Link Lists Component template should (dynamically) present a link to the Page that references the Example SEO Component

2 Answers 2

4

If you are talking about rendering a component link in your page, the fact that the data comes from a component link in your page metadata is irrelevant. Your template is responsible for emitting component linking code, and for specifying the page and component which should be used.

So if you render the component link from the page metadata using the id of your page, you will get exactly the same result as if you render a component link from say, an RTF using the id of the page. In either case, if you used a different page id, it's possible that the link would resolve to a different page.

If you are talking about trying to link to a component on the basis of it being referenced in a page metadata field, the simple answer is no, it won't be resolved. The metadata that makes a component a link target is emitted when a component presentation is rendered using a component template with a priority (i.e. not Never Link).

The pedantic answer is - "maybe", because these days you can render a component presentation from a template even if the component presentation isn't in the page you are rendering.

I don't know what you are doing with your SEO components. Do you just reach into them and render some of the data as part of say, your page template - or do you use a Component Template to render them?

To be clear about this: if your page template reaches into a component (perhaps from a metadata link) and grabs some data to render, this will not put the component on the page. Calling RenderComponentPresentation() will put the component on the page, with the priority of the component template that was used.

An interesting edge case, which you'd have to test experimentally, is when a component template calls RenderComponentPresentation(). My guess would be that the "nested" component presentation would also be added to the page.

Bottom line - if you don't render it using a component template, you can't link to it with a component link.

6
  • I added an example--your third paragraph describes the setup. I'm not sure when the "maybe" applies. If you render a Component Presentation independent of a page, would it resolve? I thought (Tridion) pages are always required to resolve Component links. The details of the SEO components don't matter here, think of them as "page references" or something I'd like to link to rather than use their fields. In the example I have in mind, the fields are either templated onto the page or put in a navigation file of sorts and retrieved in the Web Application. Commented Apr 7, 2015 at 22:25
  • I've updated the answer. Commented Apr 8, 2015 at 11:51
  • I've seen how calling RenderComponentPresentation() adds the referenced Component Presentation to the package and publishes it if it's dynamic. Are you saying that a dynamic link to that Component (with matching template or priority) can resolve to that page, even if the Component Presentation is not in the Tridion page's Component Presentation tab? Commented Apr 8, 2015 at 17:32
  • That's what I was saying, yes. But now you've made me doubt myself. Are you going to test it? Commented Apr 9, 2015 at 20:35
  • As part of your answer I was hoping you had proof. :-) But I can test. Aside from checking link behavior, which CD tables again would confirm a yea or nay? Commented Apr 9, 2015 at 22:54
2

If I understand you correctly, the answer is no:

Comp A -> (embedded) -> Page Metadata

It's possible to generate a PageLink based on where the component is used, so you can still have the full benefits of dynamic linking.

2
  • I think both you and Dominic got it. I added an example to explain I have Link List -> Page "SEO" Reference Component <- Page Metadata. I want the link to resolve to the page, so the Link List's Component Template needs to create a PageLink (maybe based on the type of link or the Schema of the linked item). Links in RTF need similar logic. Commented Apr 7, 2015 at 22:32
  • Dominic's is a fine answer, and he's a great guy.... HOWEVER... i just know from experience that the component embedded against the page metadata likely isn't rendered in some other page using a template, even if it is, it's likely the page you wouldn't want to link to.
    – johnwinter
    Commented Apr 7, 2015 at 22:48

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.