Dashboard > Community Wiki > ... > Template Examples > Importing a column as paragraph
Importing a column as paragraph Log In View a printable version of the current page.

Added by GrĂ©gory Joseph , last edited by Boris Kraft on Mar 14, 2008  (view change)
Labels: 

How to import content maintained in a one page as a paragraph in another page

To access the content of another page the current user must have access rights to read that page.

The attached <paragraph>.jsp does the following:

  1. get the handle for the page containing the column of interest (as provided by the edit dialog)
  2. get the column identifier (as defined by the edit dialog)
  3. load the page from the HierarchyManager and get the child representing the column
  4. iterate through the children of the column
    1. for each child extract the paragraph template
    2. assemble the URL for the paragraph
    3. set the necessary Attributes
    4. get the RequestDispatcher from the ServletContext for that URl
    5. include the request in the RequestDispatcher

Done.
Be aware not to create circular inclusions!

Attached are the jsp file for the paragraph and the exported dialog tree.

What you must edit:

  1. edit the column identifier in the dialog "tabColImport/contentColumn/options/*/values"
  2. create a paragraph entry mapping and identifying the dialog and jsp

In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:13:32 AM by BorisKraft
Other known authors include :

  • Uwer
Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators