[
    {
        "general": {
            "text": "To have a common header and footer for a page you can use a template-ref with the property outer set to true. Uncheck the <b>general </b>value to see the effect of removing the outer. <div><br /></div><div>This can only be used once per page because the page's template is renamed to <i>inner</i> and rendered in the context of the referenced template as a partial. This limitation will be lifted soon.<div><br /></div><div>There for the outer template must include this snippet:</div><div><i><br /></i></div><div><i>..</i></div><div><i>{{#inner}}</i></div><div><i>  {{&gt;inner}}</i></div><div><i>{{/inner}} </i></div><div><i>..</i></div></div>",
            "previous": 0.5585797596722841,
            "next": 0.396803876850754
        },
        "name": "7. outer example ",
        "template": "outer-example",
        "parent": 0.9207160123623908,
        "id": 0.0717921897303313
    },
    {
        "embedded": {
            "level": "info",
            "headline": "This is a callout",
            "text": "Calling out to the world !!!!",
            "__type__": "callout"
        },
        "name": "9. embed a multi template",
        "template": "multi-template-example",
        "parent": 0.9207160123623908,
        "id": 0.16910117072984576,
        "general": {
            "text": "Here is an example of an embedded object which may be of different types.<div>The property <i>__type__ </i>defines which template is used.</div>",
            "previous": 0.396803876850754,
            "next": 0.779862648807466
        }
    },
    {
        "page": 0.9503363266121596,
        "name": "5. embed a page's data",
        "template": "embed-page-data-example",
        "parent": 0.9207160123623908,
        "id": 0.1705826693214476,
        "general": {
            "text": "To use a page's data the usage of the page must be set to <b>data.</b>",
            "previous": 0.7305031197611243,
            "next": 0.5585797596722841
        }
    },
    {
        "name": "components",
        "parent": 1,
        "template": "folder",
        "id": 0.26918259798549116
    },
    {
        "selectedNavItem": "Documentation",
        "name": "8. reuse content in templates",
        "template": "embed-navbar-example",
        "parent": 0.9207160123623908,
        "id": 0.396803876850754,
        "general": {
            "text": "It is possible to embed content in a template. All instances of the template inherit this content. The content embedded in the template is merged with the content of the page.<div><br /></div><div>That's useful for a global navigation for example. In this example the navbar is embedded and the selected item is defined by the property <i>selectedNavItem</i>. The template <i>navbar </i>has a single variable that is not defined by its own form and needs to be provided via a parameter selectedNavItem.</div><div><br /></div><div>Change selectedNavItem to Tutorial to see the effect.</div>",
            "previous": 0.0717921897303313,
            "next": 0.16910117072984576
        }
    },
    {
        "name": "etc",
        "parent": 1,
        "template": "folder",
        "id": 0.4034360437653959
    },
    {
        "link": 0.43755838507786393,
        "name": "2. create a link",
        "template": "link-example",
        "parent": 0.9207160123623908,
        "id": 0.43688156083226204,
        "general": {
            "text": "<span style=\"color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\">The attribute </span><i style=\"box-sizing: border-box; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\">multi-page-ref</i><span style=\"color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\"> creates a reference to another page. Inthis case the </span><i style=\"box-sizing: border-box; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\">usage</i><span style=\"color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\"> is set to </span><i style=\"box-sizing: border-box; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\">link</i><span style=\"color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\"> which means that the page's id is added to the render context. By using the </span><i style=\"box-sizing: border-box; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\">link</i><span style=\"color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 20px; background-color: rgb(255, 255, 255);\"> handlebars helper a proper href is generated from that.</span>",
            "previous": 0.9611864553298801,
            "next": 0.6374826563987881
        }
    },
    {
        "name": "Documentation",
        "template": "test-tree",
        "parent": 1,
        "id": 0.43755838507786393,
        "main": {
            "selectedNavItem": "Documentation",
            "title": "Documentation"
        },
        "headline": "cms<strong style=\"color:red\">4</strong>apps",
        "text": "<div><div><br /></div></div>",
        "sections": [
            {
                "headline": "Introduction",
                "blocks": [
                    {
                        "text": "Cms4apps provides a very flexible solution to manage the content of dynamic web applications. <div><br /></div><div><b>application integration minimized</b></div><div>Cms4apps can be integrated with any dynamic web application. It only shares templates and content with the application. The application's logic is not integrated in the cms but rather mocked with managed data. An Application with a shopping cart will store the contents of the cart in the session while cms4apps simply provides the author with an editor to create mock cart content. This works well for side-effect free template languages like handlebars.<div><br /></div><b>template language agnostic</b><br /><div>cms4apps can be integrated with different templating frameworks Handlebars is supported out-of-the-box.</div><div><br /></div><div><b>datastore agnostic</b></div><div>Any rest server with crud and query operations can be used as a backend for content data. JCR, MongoDb and localstorage are supported out-of-the-box. Others can be integrated by implementing the javascript store abstraction.</div><div><br /></div><div><b>powerful modeling</b></div><div>Cms4apps provides a sophisticated metadata editor to create the content author's user interface. No need to learn a complex dsl to create ui metadata.</div><div><b><br /></b></div><div><b>Integration</b></div><div>Cms4apps is based on gform-app which makes it possible to provide data and content management for different dynamically or statically typed data stores side-by-side in a single tool.</div></div><div><br /></div><div><br /></div>",
                        "__type__": "paragraph"
                    }
                ]
            },
            {
                "headline": "Getting started",
                "blocks": [
                    {
                        "text": "The application consists of three views which can be switched in the selector in the top toolbar. <div><br /></div><div><b>page view</b></div><div><br /></div><div>this view provides a tree and a grid to browse the pages in the left pane. It provides a context menu to delete pages and to edit pages in raw json form. The grid subview has a gui for creating simple queries and a text editor for creating more advanced queries. The gui queries only support the standard attributes name, parent and template. The text editor supports queries on all top level attributes. The format is mongodb-like. To <span style=\"line-height: 1.23099987323468;\">search for page with a name that contains a digit use this query: </span><i style=\"line-height: 1.23099987323468;\">{&quot;name&quot;:{&quot;$regex&quot;:&quot;\\\\d&quot;}}</i></div><div><br /></div><div>In the center pane is the page preview. It displays the the rendered html of the currently selected page. </div><div><br /></div><div>On the right there is the detail editor. Each page is opened in a new tab. The context menu in the tab header supports closing all or all the other tabs. This is where the author edits the content. On the top of the detail editor is a drop down list and button. The template of the page can be changed here. The Button switches to the detail editor of the currently selected template.</div><div><br /></div><div>In the top toolbar there is a button to add a new page and to expand the size of the preview.</div><div><br /></div><div><b>template view</b></div><div><br /></div><div>this view provides a grid to browse the templates on the left and a detail editor on the right. The templates provide the following information</div><div><br /></div><div><ul><li>the ui that the author uses to edit the content<br /></li><li>the actual handlebars template</li><li>the schema of the content including validation rules</li></ul></div><div><br /></div><div><br /></div><div><b>partial view</b></div><div><b><br /></b></div><div>The partial view is similar to the template view. The main difference between templates and partials is that a partial cannot be instantiated to create a new page. Partials can be used as components of templates.</div><div><br /></div><div><br /></div><div><br /></div>",
                        "__type__": "paragraph"
                    },
                    {
                        "level": "info",
                        "text": "This cms4apps instance uses <b>localstorage</b> as data store. You may edit all of the content. Once you press <i>reset store </i>in the top toolbar all your data will be lost and the original will be restored. To export the current content open the console and call <i>appController.exportToJson(&quot;page&quot;)</i>. Repeat with the stores <i>/template</i> and <i>partial</i>.",
                        "__type__": "alert"
                    }
                ]
            }
        ]
    },
    {
        "page": 0.9503363266121596,
        "extra": "  only 3 € today!",
        "name": "6. embed a page as partial",
        "template": "embed-partial-example",
        "parent": 0.9207160123623908,
        "id": 0.5585797596722841,
        "general": {
            "text": "It is also possible to embed the referenced page's template as a partial and add the data to the current render context. <div>This can be useful when rendering a navigation. It is the same on all pages but the highlighted item is passed from the parent context to the navigation.</div>",
            "previous": 0.1705826693214476,
            "next": 0.0717921897303313
        }
    },
    {
        "teaser": {
            "amount": 12,
            "text": "A brand new bathtub"
        },
        "name": "3. embed a template",
        "template": "embed-example",
        "parent": 0.9207160123623908,
        "id": 0.6374826563987881,
        "general": {
            "text": "<span style=\"font-family: Times; font-size: medium; line-height: normal;\">The markup below the ruler is defined in an embedded template. To embed a template an attribute of type </span><i style=\"font-family: Times; font-size: medium; line-height: normal;\">template-ref</i><span style=\"font-family: Times; font-size: medium; line-height: normal;\"> is used.</span>",
            "previous": 0.43688156083226204,
            "next": 0.7305031197611243
        }
    },
    {
        "name": "Tutorial",
        "template": "test-tree",
        "parent": 1,
        "id": 0.6610063819680363,
        "main": {
            "selectedNavItem": "Tutorial",
            "title": "tutorial"
        },
        "headline": "Tutorial",
        "text": "",
        "sections": [
            {
                "headline": "General",
                "blocks": [
                    {
                        "text": "This tutorial consists of a series of example pages. The templates are intentionally kept very simple. There is only a short description of the example and the rendered output. To understand what is going on do the following:<div><br /></div><div><ol><li>investigate the detail editor and change it's values. </li><li>In the detail editor click on &quot;<i>...&quot; </i>in the toolbar to open the template editor. In the template editor checkout the template tab to see the handlebars template. Also in the form tab checkout the attribute defininitions.</li><li>open the context menu of the page in the tree and choose <i>open as json</i>. This will give yoou an understanding of the actual content data.</li></ol></div>",
                        "__type__": "paragraph"
                    },
                    {
                        "level": "info",
                        "text": "If you think you messed up the content, then simply press <i>reset store </i>in the top toolbar.",
                        "__type__": "alert"
                    }
                ]
            },
            {
                "headline": "First Steps",
                "blocks": [
                    {
                        "text": "The first steps are very basic. Simply follow the links below and have a look at the detail editor and its template. There is usually a single field that can be edited. Remember that the attributes id, name and parent always present in a page's template.",
                        "__type__": "paragraph"
                    },
                    {
                        "links": [
                            0.9611864553298801,
                            0.6374826563987881,
                            0.43688156083226204,
                            0.7305031197611243,
                            0.1705826693214476,
                            0.5585797596722841,
                            0.0717921897303313,
                            0.396803876850754,
                            0.16910117072984576,
                            0.779862648807466
                        ],
                        "__type__": "linklist"
                    }
                ]
            }
        ]
    },
    {
        "name": "Pool Ad",
        "template": "Ad",
        "parent": 0.26918259798549116,
        "id": 0.6658711258787662,
        "text": "Forget about bathtubs. Get a pool!"
    },
    {
        "page": 0.9503363266121596,
        "name": "4. embed a page",
        "template": "embed-page-example",
        "parent": 0.9207160123623908,
        "id": 0.7305031197611243,
        "general": {
            "text": "This is an example of a reference to a page which is embeded as html.",
            "previous": 0.6374826563987881,
            "next": 0.1705826693214476
        }
    },
    {
        "name": "10. lots of multi templates",
        "template": "multi-array-template-example",
        "parent": 0.9207160123623908,
        "id": 0.779862648807466,
        "general": {
            "text": "To embed a dynamic number of content elements with different templates a <i>primitive array</i> of <i>multi-template-ref</i> is employed. <div><br /></div><div>The handlebars template iterates over the array an includes a dynamical partial. The name of the partial is looked up in the variable <i>__type__.</i><br /><div><br /></div><div><b>Layout</b></div><div>In this case the templates are all in a <i>verticalgroup</i> layout which means that their size needs to be defined by their container. Hence it is a good idea to use a tree container.</div></div>",
            "previous": 0.16910117072984576,
            "next": 0.6610063819680363
        },
        "embedded": [
            {
                "level": "danger",
                "text": "RED ALERT !!!",
                "__type__": "alert"
            },
            {
                "level": "warning",
                "headline": "Hello",
                "text": "We are informing you with a callout.",
                "__type__": "callout"
            },
            {
                "text": "Just some <b>content</b>.",
                "__type__": "paragraph"
            }
        ]
    },
    {
        "name": "mongomat",
        "template": "test-tree",
        "parent": 0.4034360437653959,
        "id": 0.839099807664752,
        "main": {
            "selectedNavItem": "Mongomat",
            "title": "Mongomat"
        },
        "headline": "Mongomat",
        "text": "<span style=\"line-height: normal;\">Mongomat is the best place to manage mongodb data. The query builder ui and the completely customizable detail editor are the highlights of mongomat.</span>",
        "sections": [
            {
                "headline": "Introduction",
                "blocks": [
                    {
                        "text": "The main application is split into different views. The views can be switched in the drop-down-list in the top toolbar. The list will start with the following items:<div><br /></div><div><ul><li><b>documentation</b> calls up this document<br /></li><li><b>settings</b> calls up the collection metadata, which holds all the customization</li><li><b>db</b> calls up the list of configured databases</li><li><b>schema</b> calls up the list of schemas and </li></ul><div>The entries following the schema view will be the configured databases. These open up submenus with links to all collections' views.</div></div>",
                        "__type__": "paragraph"
                    }
                ]
            },
            {
                "headline": "Collection view",
                "blocks": [
                    {
                        "text": "Select a database and a collection from the view selector in the top toolbar. The view changes and provides a grid on the left and a detail editor on the right. <div><br /></div><div><br /></div><div><b>Toolbar</b></div><div><b><br /></b></div><div>In the top toolbar there is the view selector and three more buttons:<div><br /></div><div><ul><li><b>add</b> for adding a new document <br /></li><li><b>settings</b> for opening the settings view</li><li><b>help</b> for displaying a help tooltip</li></ul><div><b><br /></b></div><div><b>Grid</b></div></div></div><div><b><br /></b></div><div>The grid provides a json editor to create a customer query. Also it provides a query builder which opens when clicking on the filter icon on the top left of the grid. Clicking on the column header sorts the data by the columns values. The context menu on the rows provide two actions:</div><div><br /></div><div><ul><li><b>open as json</b> opens the document in a pure json editor.</li><li><b>delete</b> opens a confirmation dialog and will delete the document.</li></ul><div><b><br /></b></div><div><b>Detail editor</b></div></div><div><br /></div><div>The detail editor provides a number of self-explanatory actions on the bottom:</div><div><br /></div><div><ul><li>save<br /></li><li>discard</li><li>delete</li><li>close</li></ul><div>On the top there can be a selector which shows the schema of the document and can be used to switch to a different type. The selector shows up only if the collection was configured to have more than one schema in the settings view.</div></div><div><br /></div><div><br /></div>",
                        "__type__": "paragraph"
                    }
                ]
            },
            {
                "headline": "Settings View",
                "blocks": [
                    {
                        "text": "<p>The settings view is accessed from the view selector or by clicking on settings in a collection view. The settings view contains metadata for the collections. This metadata is stored in a special mongodb database. The settings view is just like a collection view for the collection metadata with extra functionality.</p><p>The detail editor provides the following properties in the top pane:</p><p></p><ul><li><b>name</b> the name of the collection as used in the view selector <br /></li><li><b>collection</b> the monogdb collection name.</li><li><b>db</b> the database that contains the collection.</li><li><b>allow user assigned id?</b> check this if you want the user to provide the mongodb id.</li><li><b>description</b> is displayed in the help tooltip in the collection view.</li><li><b>schema </b>defines the schema or schemas that documents in the collection conform to.</li></ul><p></p><p><br /></p><p><b>Schema</b></p><p>A collection can have one or more schemas associated with it. The purpose of the schema is to guide the user in editing documents by providing a sophisticated detail editor. Either there is a single schema for all documents in the collection or each document contains a property that serves as type discriminator - called type property. Schemas are stored separately and it is possible to compose schemas by reference, so that even a recursive schema structure representing a tree model is possible. </p> The following operations are available: <ul> <li><b>add </b>creates a new collection (toolbar)</li> <li><b>delete</b> collection and its metadata</li> <li><b>go to view</b> jump to the data view of the selected collection</li> <li><b>generate schema</b> information by sampling existing data</li></ul><p><b><br /></b></p><p><b>\tGenerating the schema</b> </p><p>Generating the schema is a very useful feature if there is an existing collection containing documents. The\tgeneration dialog asks the user to specify the number of documents to sample and optionally the name of the type property. Restricting the number of samples will yield a faster generation process but may produce a less exact result. The type property maybe specified if one exists. A type property is a property whose value is interpreted as a type discriminator. There will be a distinct schema for each value of the property. If the documents in the collection were created by a Mapping library in a statically typed OO-language (e.g. Morphia or spring data for Java) then the name of the class will most likely be stored in the type property. </p><p>Once you generated the schema you still want to customize it.</p><p><b><br /></b></p><p><b>Customizing schema and editor</b></p><p>The schema contains information about the editor which the author uses to create and edit documents:</p><p><ul><li>the order of the attributes<br /></li><li>descriptions for each attribute<br /></li><li>attributes can be grouped in columns, tab or accordions</li><li>attributes can be made visible, disabled</li></ul></p>",
                        "__type__": "paragraph"
                    }
                ]
            },
            {
                "headline": "Db view",
                "blocks": [
                    {
                        "text": "The list of dbs provides information about their size on disk. The details include the list of collections.<br />The operations available on a single db include the creation of a new collection and the synchronization between<br />the actual db's collections and the collections stored in the metadata store. When starting the app these two will be synchronized automatically. If a new collection is created in the db while this app is running then this new collection will not be displayed until a synchronization is performed. A db cannot be created in mongomat right now.",
                        "__type__": "paragraph"
                    }
                ]
            }
        ]
    },
    {
        "name": "dashboard",
        "selectedNavItem": "Example",
        "template": "dashboard",
        "parent": 1,
        "id": 0.8617925944272429,
        "rows": [
            {
                "charts": [
                    {
                        "label": "Pageviews by browser (past 24 hours)",
                        "width": 8,
                        "chart": {
                            "stacked": true,
                            "height": "250px",
                            "width": "auto",
                            "chartAreaLeft": "10%",
                            "chartAreaTop": "5%",
                            "chartAreaWidth": "60%",
                            "chartAreaHeight": "75%",
                            "store": {
                                "collection": "pageviews",
                                "groupBy": "user.device_info.browser.family",
                                "interval": "hourly"
                            },
                            "design": {"chartType": "areachart"}
                        },
                        "notes": "<span style=\"color: rgb(128, 128, 128); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; line-height: 17.142858505249px; background-color: rgb(251, 251, 251);\">This is a sample text region to describe this chart.</span>"
                    },
                    {
                        "label": "Pageviews by browser (past 5 days)",
                        "width": 4,
                        "chart": {
                            "title": "asdasd",
                            "stacked": true,
                            "height": "250px",
                            "width": "auto",
                            "chartAreaLeft": "10%",
                            "chartAreaTop": "5%",
                            "chartAreaWidth": "60%",
                            "chartAreaHeight": "75%",
                            "store": {
                                "collection": "pageviews",
                                "groupBy": "user.device_info.browser.family",
                                "interval": ""
                            },
                            "design": {
                                "pieHole": 0.4,
                                "chartType": "piechart"
                            }
                        },
                        "notes": "Notes go down here"
                    }
                ]
            },
            {
                "charts": [
                    {
                        "label": "Impressions by advertiser",
                        "width": 4,
                        "chart": {
                            "stacked": true,
                            "height": "250px",
                            "width": "auto",
                            "chartAreaLeft": "10%",
                            "chartAreaTop": "5%",
                            "chartAreaWidth": "60%",
                            "chartAreaHeight": "75%",
                            "store": {
                                "collection": "impressions",
                                "groupBy": "ad.advertiser",
                                "interval": "hourly"
                            },
                            "design": {
                                "barGroupWidth": "80%",
                                "chartType": "columnchart"
                            }
                        },
                        "notes": ""
                    },
                    {
                        "label": "Impressions by device",
                        "width": 4,
                        "chart": {
                            "stacked": true,
                            "height": "250px",
                            "width": "auto",
                            "chartAreaLeft": "10%",
                            "chartAreaTop": "5%",
                            "chartAreaWidth": "60%",
                            "chartAreaHeight": "75%",
                            "store": {
                                "collection": "impressions",
                                "groupBy": "user.device_info.browser.family",
                                "interval": "hourly"
                            },
                            "design": {
                                "barGroupWidth": "80%",
                                "chartType": "columnchart"
                            }
                        },
                        "notes": ""
                    },
                    {
                        "label": "Impressions by country",
                        "width": 4,
                        "chart": {
                            "stacked": true,
                            "height": "250px",
                            "width": "auto",
                            "chartAreaLeft": "10%",
                            "chartAreaTop": "5%",
                            "chartAreaWidth": "60%",
                            "chartAreaHeight": "75%",
                            "store": {
                                "collection": "impressions",
                                "groupBy": "user.geo_info.country",
                                "interval": "hourly"
                            },
                            "design": {
                                "barGroupWidth": "80%",
                                "chartType": "columnchart"
                            }
                        },
                        "notes": ""
                    }
                ]
            }
        ]
    },
    {
        "name": "tutorial",
        "parent": 1,
        "template": "folder",
        "id": 0.9207160123623908
    },
    {
        "name": "Another Ad",
        "template": "Ad",
        "parent": 0.26918259798549116,
        "text": "Get a shower curtain! ",
        "id": 0.9309477722272277
    },
    {
        "name": "An Ad",
        "template": "Ad",
        "parent": 0.26918259798549116,
        "id": 0.9503363266121596,
        "text": "Go get the new <strong>bathtub</strong>!"
    },
    {
        "text": "This is a dynamic text.",
        "name": "1. simple property",
        "template": "first-example",
        "parent": 0.9207160123623908,
        "id": 0.9611864553298801,
        "general": {
            "text": "This is a simple example with one attribute <b>text </b>of type <i>string. </i>The template simply displays the string in a paragraph. <span style=\"line-height: 1.23099987323468;\">Try changing the value in the </span><b style=\"line-height: 1.23099987323468;\">richtext </b><span style=\"line-height: 1.23099987323468;\">editor.</span>",
            "previous": 0.6610063819680363,
            "next": 0.43688156083226204
        }
    },
    {
        "id": 1,
        "parent": null,
        "template": "folder",
        "name": "root"
    },
    {
        "brand": "cms4apps",
        "navItems": [
            {
                "label": "Documentation",
                "page": 0.43755838507786393
            },
            {
                "label": "Tutorial",
                "page": 0.6610063819680363
            },
            {
                "label": "Example",
                "page": 0.8617925944272429
            }
        ],
        "template": "navbar",
        "parent": 0.26918259798549116,
        "name": "navbar",
        "id": 4
    }
]
