[DOCU-123] Content reuse Created: 15/Feb/11  Updated: 16/Jul/12  Resolved: 26/Oct/11

Status: Closed
Project: Documentation
Component/s: content
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Antti Hietala Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File config.modules.standard-templating-kit.dialogs.pages.section.stkFetchPageHeader.xml     XML File config.modules.standard-templating-kit.templates.stkFetchPage.xml     File fetch page mainArea.ftl     PNG File fetchPage_dialog.png     PNG File fetchPage_dialog_def.png     PNG File fetchPage_output.png     PNG File fetchPage_template_def.png    
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 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

  1. Create a new Referenced Page template, similar to Redirect template.
  2. Apply the template to a page in the affiliate hierarchy.
  3. Use page properties to point to a source page in parent company hierarchy.
  4. 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

  1. Create a new Reusable Content page template, a special template that allows you to add a paragraph or a widget.
  2. Create a separate hierarchy of pages where you store the reusable paragraphs. This hierarchy is not displayed on public instance.
  3. Apply the Reusable Content template to these page.
  4. Create a new Referenced Paragraph paragraph template.
  5. Add the Referenced Paragraph on content pages.
  6. 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


 Comments   
Comment by Antti Hietala [ 08/Apr/11 ]

ChristianR's example of fetching the content of one page and displaying it on another page.

Comment by Suzanne Deprez [ 22/Sep/11 ]

Started working on this under Technical Guide.

Comment by Suzanne Deprez [ 30/Sep/11 ]

Have this procedure for reusing pages:

  1. Create a template that will reuse an existing page.
  2. Create a dialog that will provide for selecting the page that will be reused.
  3. Add template definition that references dialog and template.
  4. Make available to all sites.
  5. Select template for pages that need to reuse other pages.
  6. Edit page that has that reuse template and select page to reuse.
Comment by Natascha Desmarais [ 05/Oct/11 ]

fetchPage_dialog.png: Displayed dialog for ChristianR's fetch page example
fetchPage_dialog_def.png: How the dialog is configured
fetchPage_template_def.png: How the fetchPage template is configured (with appropriate header dialog, the rest is equal to section)

Comment by Natascha Desmarais [ 05/Oct/11 ]

fetchPage_output.png: How the site is rendered within the admin view. The little link that states where the content is fetched from is NOT displayed in the final output. This is just a help for authors.

Comment by Natascha Desmarais [ 05/Oct/11 ]

Also attached the xml exports of the template and dialog configurations.

Comment by Suzanne Deprez [ 06/Oct/11 ]

Updated reuse page section in Content reuse page on docuauthor to document template, dialog, etc. I developed for reusing a page.

Comment by Suzanne Deprez [ 17/Oct/11 ]

Moved page to Use Cases.

Comment by Suzanne Deprez [ 25/Oct/11 ]

Submitted activation of page and images.

Comment by Antti Hietala [ 26/Oct/11 ]

Approaches documented in http://documentation.magnolia-cms.com/use-cases/content-reuse.html

Generated at Mon Feb 12 01:06:08 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.