2

I have page meta data schema, which needs to have a field which can be linked to page link by providing the TCM ID value of the page to be linked. eg. Canonical URL is the field in the schema and with the value tcm:5-1315-64. The DXA 1.2 while processing the Metadata Field just give the value as tcm:5-1315-64.

How can i resolve the field to get the page link ?

  • What is the type of the View Model property you are mapping to? – Rick Pannekoek Jan 14 '16 at 18:24
  • @RickPannekoek. Our requirement was custom to link to the page rather use the in built component. something like this – Hemraj Jain Jan 15 '16 at 11:57
  • That example uses relative paths, which are unmanaged as well. Tridion Content Delivery can resolve tcdl page links you "template." But using fields with tcm urls will cause pains for editors and across DTAP. – Alvin Reyes Jan 15 '16 at 19:17
7

Indeed, DXA model mapping doesn't support Page Links just like CM itself doesn't support that.

What you are suggesting (putting a Page TCM URI in a text field) is a bad idea in general; it is not a managed link and will give problems when you delete the referenced Page or when you port the item to another environment.

Content Manager (and DXA) assumes you use Component Links (which will resolve to Page URLs).

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.