In 7.3, it is not possible to preview a document using a combination of a custom Document Type and Display Page Template.
Specifically the URL generated for that document in either an Asset Publisher or in Search results does not redirect to that Display Page Template.
The document displays a Friendly URL in Search Results or Asset Publisher which causes the Display Page Template to be used to render the full preview of the document and its fields.
Two different behaviours have been observed:
- If DPT has been created for "Basic Document" a "generic" URL (i.e. not a Friendly URL) is generated and therefore the document previews in the context of where it was found (e.g. Search results portlet, Asset Publisher portlet)
- If a DPT has been created for "Basic Document" a friendly URL is generated, but the document is rendered in the DPT for "Basic Document", not it's own DPT
Steps to Reproduce:
- Create a new Document Type, add one custom Field
- Create a Display Page Template mapped to this Document Type, add a Heading Fragment and edit the default text to "Custom Document Type". Add a Paragraph Fragment and map to your custom field
- Mark this DPT as the Default for the Document Type
- Add a Document for your new Document Type, upload a file and ensure that a value is added for your custom field
- Search for this document, observe that the generated URL is not a friendly URL - e.g.
(This represents the first observed behaviour as described above)
- Now, add a new DPT for Basic Document, add a Heading Fragment and edit the default text to "Basic Document", add a Paragraph Fragment and map to the Title.
- Publish the DPT and mark it as the Default
- Search for your Document again, this time the URL is the friendly one - e.g.
- Follow the link and observe that the DPT for Basic Document is used to display the document
(This represents the second observed behaviour as described above)