[DOCU-95] Developer Samples module Created: 14/Dec/10  Updated: 30/Dec/14  Resolved: 30/Dec/14

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

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

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

Expand module article for Developer Samples module. Introduction, what is it about. Put on module store.



 Comments   
Comment by Ruth Stocks [ 28/Apr/11 ]

Page updated at http://docuauthor.magnolia-cms.com/modules/samples.html

In the "AdminCentral - Samples menu - Filter" section, I moved the sample filter for the screenshot. I recall reading somewhere that filters are executed in a specific sequence and am not sure if the sequence they appear in Configuration is significant or not.

Comment by Antti Hietala [ 16/May/11 ]

Great start. Push this article further by explaining what the examples actually do:

  • "Displays Sources" is an example of a custom servlet (DisplaySamplesSourcesServlet) whose task is to display the source of a template script or paragraph script. The "Main template" link on the page displays the source of main.ftl or main.jsp, depending on which page you are on, while the "HowTo Paragraph" link displays the source of the paragraph script. You already explained where this servlet is configured but not the feature it tries to illustrate. Explain also where the template and paragraph scripts (.ftl, .jsp) are loaded from. Which path? Lesson: templates can be loaded from multiple locations (list them).
  • howTo dialog is a showcase of four different kinds of controls. What does /modules/samples/dialogs/controlsShowRoom demonstrate? How can I see the dialog? Link to controls reference for more examples.
  • howTo paragraph script (howTo.ftl) shows how to use the information captured in those four controls. The script displays the selected image on the page, renders the title and rich text the user typed, and prints the selected date (example of date formatting).
  • The "Parameter set by filter" is an example of setting an attribute in a custom filter (SampleFilter.java) and retrieving its value in two ways: 1) asking the paragraph model (SampleParagraphModel.java) which gets the parameter value from the Magnolia context using the (MgnlContext.getAttribute) method and 2) using the ctx templating support object.
  • There's also an example of a site search. The search term is captured on the howTo page while results are retrieved and displayed on searchResult.jsp. The search results page illustrates the use of CMS Utility Tag Library, cmsu:simpleSearch tag
  • SampleTemplate.java is an example of extending the default template with custom parameters. See comments in code.
  • What feature(s) does the Product Selection example illustrate?
  • See http://wiki.magnolia-cms.com/display/DEV/Dev+Samples+Module

Re: the question about filter execution order, it is the same order as nodes in /server/filters. Order is significant. Sometimes you can move a filter in the chain but not randomly.

Comment by Ruth Stocks [ 17/Jun/11 ]

Updated page at - http://docuauthor.magnolia-cms.com/modules/samples.html.

Comment by Ruth Stocks [ 17/Jun/11 ]

Replaced large tables as per Skype discussion

Comment by Ruth Stocks [ 30/Dec/14 ]

documented at http://documentation.magnolia-cms.com/display/DOCS/Templating+Samples+module

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