Guest

Untitled

By: a guest on Feb 12th, 2012  |  syntax: None  |  size: 3.71 KB  |  hits: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. <!--
  2. The JCR repository - written in XML for easy reading. actual dumps will look more like this
  3. http://willcode4beer.com/design.jsp?set=gettingStartedWithJCR&pageNum=4
  4. -->
  5. <root>
  6.   <!--
  7.        these pages are assigned layout and the hierarchy could represent the url structure
  8.        instead of the controller attribute, we might want to use custom nt:nodeType and map node types to controllers...
  9.   -->
  10.   <pages>
  11.     <Home_Page controller="Application:MyBlog:home" page_title="Welcome" body="Hello world">
  12.       <my_blog controller="Application:MyBlog:list" page_title="My Blog" intro="Welcome to my Blog" orderable_child_nodes="true">
  13.         <Other_Entry_2010-09-24 controller="Application:MyBlog:blog" date="2010-09-24T13:01:04.758+02:00">
  14.             <sv:property sv:name="blog_image" jcr:nodeType="nt:weak-reference"><sv:value>842e61c0-09ab-42a9-87c0-308ccc90e6f3</sv:value></sv:property>
  15.         </Other_Entry_2010-09-24>
  16.         <!--
  17.              uri for this page is /my_blog/Other_Entry_2010-09-24.html
  18.              uri for the image is probably resolved in output and /assets/blog_images/other.jpg
  19.         -->
  20.         <An_Entry_2010-09-23 controller="Application:MyBlog:blog" date="2010-09-23T13:01:04.758+02:00">
  21.             <illustration.png jcr:primaryType="nt:file" alt="Hello World!" jcr:created="2010-09-27T13:01:04.758+02:00">
  22.               <jcr:content jcr:primaryType="nt:unstructured" jcr:data="aDEuIENoYXB0ZXIgMSBUaXRsZQoKCiog..." jcr:lastModified="2009-04-27T13:01:07.472+02:00" jcr:mimeType="image/png"/>
  23.             </illustration.png>
  24.             <!--
  25.                  user uploaded an image with this post that does not go into repository (well, this is a philosophical question independent of jcr or not)
  26.                  uri would be /my_blog/An_Entry_2010-09-23/illustration.png
  27.             -->
  28.         </An_Entry_2010-09-23>
  29.       </my_blog>
  30.       <about controller="Application:Standardpage" page_title="About us" body="..." />
  31.     </Home_Page>
  32.   </pages>
  33.   <!--
  34.        this would be the place to store objects which don't have a specific page, but can appear on many pages eg. internal ads, quick links
  35.        we might want to put blog items here if they are aggregated dynamically in several places.  
  36.        but even then, maybe there is a primary place for the blog and other things like "recent posts" can fetch info from there.
  37.   -->
  38.   <objects>
  39.     <blogs type="folder" name="Blog Entries">
  40.       <Blog-Entry-1 body="Hello World!" />
  41.     </blogs>
  42.   </objects>
  43.    
  44.   <!--
  45.        these assets are represented in a folder structure in the cms
  46.        this is to create some basic images used everywhere
  47.   -->
  48.   <assets>
  49.     <blog_images jcr:primaryType="nt:folder" name="Blog Images">
  50.       <hello.png jcr:uuid="842e61c0-09ab-42a9-87c0-308ccc90e6f4" jcr:primaryType="nt:file" jcr:mixinTypes="mix:referenceable"
  51.                 alt="Hello World!" jcr:created="2009-04-27T13:01:04.758+02:00">
  52.           <jcr:content jcr:primaryType="nt:unstructured" jcr:data="aDEuIENoYXB0ZXIgMSBUaXRsZQoKCiog..."  
  53.                        jcr:lastModified="2009-04-27T13:01:07.472+02:00" jcr:mimeType="image/png"/>
  54.       </hello.png>
  55.       <other.jpg jcr:uuid="842e61c0-09ab-42a9-87c0-308ccc90e6f3" jcr:primaryType="nt:file" jcr:mixinTypes="mix:referenceable"  
  56.                 alt="Hello World!" jcr:created="2009-04-27T13:01:04.758+02:00">
  57.           <jcr:content jcr:primaryType="nt:unstructured" jcr:data="aDEuIENoYXB0ZXIgMSBUaXRsZQoKCiog..."  
  58.                        jcr:lastModified="2009-04-27T13:01:07.472+02:00" jcr:mimeType="image/jpeg"/>
  59.       </other.jpg>
  60.     </blog_images>
  61.     <standard_company:logos jcr:primaryType="nt:folder" name="Standard Company Logos">
  62.     </standard_company_logos>
  63.   </assets>
  64. </root>