Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

IMMERSE 2016 Introducing content fragments

891 views

Published on

This session provides an introduction to Content Fragments and show how you can leverage the feature for efficiently managing your site.
The provided information will cover a standard use-case and focus on customizing the OOTB solution. To see the on-demand IMMERSE Session please go to http://bit.ly/Immerse16

Published in: Technology
  • Be the first to comment

IMMERSE 2016 Introducing content fragments

  1. 1. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. A virtual developer conference for Adobe Experience Manager Introducing Content Fragments Stefan Grimm | Senior Developer
  2. 2. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Introducing Content Fragments 2 1 | Welcome and Overview 2 | Theory 3 | A real world example … 4 | … and its implementation 5 | Q&A
  3. 3. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 3 Theory
  4. 4. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4 Building blocks
  5. 5. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 5 Overview, part 1
  6. 6. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6  Semantic content structure  Defined by template  Multiple formats supported  Rich text  Plain text  Markdown (limited) Elements
  7. 7. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7  Variants of element content  Global – shared by all elements  For example: Channel-specific  Defined by author  Multiple formats  Same as supported for elements Variations
  8. 8. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8 Example
  9. 9. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 9 Overview, part 2
  10. 10. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 10  Tags for classification  Standard asset metadata  Uses metadata schemas Metadata
  11. 11. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11  Associate media with a fragment  Work as suggestion for the author of the final page  No concept of semantic association (no “title image”, etc.)  Based on DAM collections Associated content
  12. 12. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12  Structure of a Content Fragment  Elements  Predefined Variations (optional)  Initial associated content (optional)  Copied to the fragment  Template changes not reflected in fragment after creation  Use Granite’s ConfMgr feature Fragment Templates
  13. 13. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13  Renders a Content Fragment on an AEM page  Options for rendering  Element to display  Variation to use  Paragraph ranges Component
  14. 14. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 14 DAM integration
  15. 15. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15 A Content Fragment is an Asset (hierarchy)
  16. 16. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 16  Elements are assets/sub-assets  Content is stored in the original rendition  Variations are renditions  Variations are tied to elements  Metadata stored on main asset  Additional structural data (“fragment model”)  MIME type specified on rendition A Content Fragment is an Asset (hierarchy)
  17. 17. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 17 “Use the API, young padawan!” com.adobe.cq.dam.cfm
  18. 18. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 18 A real world example
  19. 19. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 19 Introducing: The Adobe Times (An imaginary news site)
  20. 20. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 20 Our goal …
  21. 21. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 21 Out of the box …
  22. 22. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 22  Simple fragment template  Single element  Generic component for page authoring  provides “in-between” content feature AEM 6.2
  23. 23. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Hands on … Using Content Fragments 23
  24. 24. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 24 Too much work, huh?
  25. 25. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 25  Create article.  Enter title. Teaser. Text.  Classify.  Save.  Create page. (*)  Add Content Fragment. (*)  Reference article. (*)  Publish. (*) (*) We’ll get rid of these steps in the “Efficient Publishing with Content Fragments” session later today Efficiency!
  26. 26. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 26 Articles
  27. 27. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 27 Articles Section Title Teaser Text
  28. 28. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 28  Fragment Elements  Title  Teaser  Text  Metadata  Section Articles
  29. 29. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 29 A real world implementation
  30. 30. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 30  Create an article template  Create an article component  Create a page component TODOs ...
  31. 31. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. No production-ready code in this session! Disclaimer 31
  32. 32. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 32 Article template
  33. 33. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Hands on … Article template /apps/settings/dam/cfm/templates/article 33
  34. 34. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 34 Article component
  35. 35. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 35  Access the elements  Title, Teaser, Text  Access metadata  Section  Bring everything together  Rendering We need to …
  36. 36. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 36 Creating a fragment: Resource fragmentResource = resolver.getResource(“/path/to/fragment”); ContentFragment fragment = fragmentResource.adaptTo(ContentFragment.class); Accessing elements: Iterator<ContentElement> elements = fragment.getElements(); while (elements.hasNext()) { ContentElement element = elements.next(); // … } API – Basic patterns, part 1
  37. 37. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 37 Accessing variation: Iterator<ContentVariation> variations = element.getVariations(); while (variations.hasNext()) { ContentVariations variation = variations.next(); // … } Accessing elements/variations by name: ContentElement titleElement = fragment.getElement(“title”); ContentVariation twitterVariation = titleElement.getVariation(“twitter”); API – Basic patterns, part 2
  38. 38. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 38 Accessing content: String content = element.getContent(); String contentType = element.getContentType(); Changing content: element.setContent(“Content”, “text/plain”); … works similar for variations! API – Basic patterns, part 3
  39. 39. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 39 Map<String, Object> getMetaData(); void setMetaData(String name, Object value) throws ContentFragmentException; Just a wrapper for DAM metadata methods! - Same rules & restrictions apply. API – Accessing metadata
  40. 40. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 40  Currently no API to get HTML for plain text or Markdown  Need to use a internal include (Missing) API – Getting HTML
  41. 41. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Hands on … Article component /apps/cfm-efficient-publishing/components/article 41
  42. 42. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 42 Page component
  43. 43. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 43  “Just a simple page template”  Header (”The Adobe Times”) hardcoded  Single paragraph system holding the article  /apps/cfm-efficient-publishing/components/page  No design  No ”fancy stuff” like responsiveness, etc.  Remember? - No production-ready code in this session! JASPT
  44. 44. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. And … Action! The new article creation process 44
  45. 45. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 45 Recap  Workflow designed for efficiency  Template defining three elements  Title  Teaser  Text  Article component  Fixed layout  Tags for classification  Image taken from collection  Page component  Basic page layout
  46. 46. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 46 Epilogue
  47. 47. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 47  Decide if creating a customized component makes sense  Sufficiency of the OOTB component  Flexibility vs. efficiency  Use OOTB component as a starting point  Use tagging and metadata to classify your content  Use API, don’t access the content structure directly  Adobe might need to change it Recommendations
  48. 48. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 48 Security: Publish considerations  Provide read-access to everyone wherever required  Ensure that everything required is available on publish  Common mishap: Application Content Package not replicated to publish  Collection can not/should not be accessed on publish  References need to be resolved before publishing – manually (OOTB component) or ”on save” (*) (*) Details will be revealed in the “Efficient Publishing with Content Fragments” session later today
  49. 49. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 49 Not mentioned in this session …  Variations/channel-specific publishing  would rectify a separate session  may be a focus for 6.3  Translation services  neatly integrated  Metadata schemas
  50. 50. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 50 Resources  Content Package with example code  available from the “Resources” pod in Adobe Connect  Documentation  Overview/Authoring  Editor - https://docs.adobe.com/docs/en/aem/6-2/author/assets/content-fragments.html  Page Authoring - https://docs.adobe.com/docs/en/aem/6-2/author/page-authoring/content- fragments.html  Development  Templates - https://docs.adobe.com/docs/en/aem/6-2/develop/templates/content-fragment- templates.html  Extending (WIP) - https://docs.adobe.com/docs/en/aem/6-2/develop/extending/content-fragments.html
  51. 51. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Q&A 51 Stefan Grimm sgrimm@adobe.com
  52. 52. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

×