Details
-
Task
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
-
Empty show more show less
-
Empty show more show less
Description
Write a tutorial about content reuse options. Objective is to render the same page in multiple locations of the content hierarchy or render the same paragraph on multiple pages, a common request.
Our standard answer to such as request is that Magnolia does not provide built-in functionality where the same page exists in multiple locations in the hierarchy but this behavior can be simulated. Options:
- Simulate the JCR Reference property with a custom template.
- Use virtual URIs to map requests for the "copies" back to the source page. Customize navigation.
- Reconstruct the page by using parts of the source page in the target page. This would also require customized navigation.
None of these options are really ideal. Aperto has a better approach that relies on dedicated templates for content reuse. This should become best practice.
Business case for reusable pages
Affiliates inherit content from their parent company. While most affiliate content is unique, some pages or paragraphs need to be reproduced in verbatim. Common content should be editable in one location. Changes should propagate to affiliate sites automatically. Links pointing to other parent company page should continue to work when content is rendered on the affiliate site. Content should have affiliate theme and appear in affiliate navigation when rendered on affiliate site.
Business case for reusable paragraphs
Any sidebar content that should be displayed across many pages such as market data on business pages, upcoming baseball matches on sports pages, or latest comments on blog posts.
Reusable pages best practice
- Create a new Referenced Page template, similar to Redirect template.
- Apply the template to a page in the affiliate hierarchy.
- Use page properties to point to a source page in parent company hierarchy.
- Source page content will be rendered on public instance.
+ Parent company
+ Products
- Life insurance (source page) <-----------
- Car insurance |
- Home insurance |
+ Affiliate |
+ Products |
- Life insurance (inherited, Shadow Template points to source) ---
- ...
Reusable paragraphs best practice
- Create a new Reusable Content page template, a special template that allows you to add a paragraph or a widget.
- Create a separate hierarchy of pages where you store the reusable paragraphs. This hierarchy is not displayed on public instance.
- Apply the Reusable Content template to these page.
- Create a new Referenced Paragraph paragraph template.
- Add the Referenced Paragraph on content pages.
- Select one of the reusable paragraphs from the separate hierarchy with the paragraph dialog.
+ Home - Sports (contains a Referenced Paragraph that points to reusable content) - Business - Blog - ... + Reusable content (hidden hierarchy) - Support hotline - Connect with Facebook - Today's market data
Address the issue of canonical content. Which of the similar pieces of content is the unique source. This is important for SEO purposes. Use the canonical URL tag or permanent redirect. See SEO tech brief.
Other use cases:
- Reusing contents across sites: jobs section
- RSS aggregator and teasers as reuse mechanisms
- Data module for text blocks
- Inheritance
- Subtemplates for generating content for mobile, PDF, text, XML, newsletters