Hi,

after succeeding importing initial content, there is another problem: I import some content in json-Format (pages.json and header.json):

{
        "jcr:primaryType" : "sling:Folder",
        "home":
        {
        "jcr:primaryType": "sling:Folder",
        "jcr:mixinTypes": [ "sling:Resource" ],
        "title": "Home",
        "menu": "Home",
        "tooltip": "Home",
        "sling:resourceType": "thun/home"
    }
}

After initializing there is indeed a node "pages/home" under content. But looking in the sling jcr explorer, there are no properties at all given for this node "home" (nor for "pages". Looking "directly" in jcr (via a self built view in eclipse) the properties are shown.

The scripts look like:

home: (html.esp):

<html>
  <head>
<link rel="stylesheet" href="/shared/css/screen.css" type="text/css" media="screen" />
  </head>
  <body>
    <div id="header">
      <% sling.include("/content/header"); %>
    </div>
    <div id="navigation-bar">
        <script>
                var menus = Sling.getContent("/content/", 2);
                for (var i in menus)
                {
                        document.write("div>"
                                                + "<a href=\"/content/\"" + i + 
".html\">"
                                                + menus[i].menu );
                }
        </script>
    </div>
        <h3>Navigation</h3>
        <ul>
            <li><em><a href="/content/home/*.html">[Create new 
post]</a></em></li>
            <script>
              var posts = Sling.getContent("/content/home/", 2);
              for(var i in posts)
              {
                document.write("<li>"
                  + "<a href='/content/home/" + i + ".html'>"
                  + posts[i].title
                  + "</a></li>");
              }
            </script>
        </ul>
  </body>
</html>

header.esp:

<div id="header">
        <div id="headerimage">
                <img src="/shared/images/thun.jpg" alt="<%= currentNode.logo 
%>"/>
        </div>
        <div>
                <div id="headertitle">
<h1><a href="http://thun-korrespondenz.uibk.ac.at/"; title="<%= currentNode.title %>: <%= currentNode.subtitle %>"><%= currentNode.title %></a></h1>
                        <p><%= currentNode.subtitle %></p>
                </div>
        </div>
</div>


When I call the page via browser (http://localhost:8888/content/pages/home.html) the page is laid out but the content is shown as follows:

Resource path: /content/header

Resource metadata: {sling.resolutionPathInfo=, sling.resolutionPath=/content/header}

Resource type: thun/header

Resource super type: -
Resource properties

title: Die Korrespondenz von Leo von Thun-Hohenstein
sling:resourceType: thun/header
jcr:mixinTypes: [sling:Resource]
jcr:createdBy: admin
subtitle: Ein Forschungsprojekt am Institut für Geschichtswissenschaften und Europäische Ethnologie an der Universität Innsbruck
logo: Portrait Graf Leo von Thun-Hohenstein
jcr:created: java.util.GregorianCalendar[time=1366614685450,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT+02:00",offset=7200000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2013,MONTH=3,WEEK_OF_YEAR=17,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=112,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=9,HOUR_OF_DAY=9,MINUTE=11,SECOND=25,MILLISECOND=450,ZONE_OFFSET=7200000,DST_OFFSET=0]
jcr:primaryType: sling:Folder
Navigation


What's going wrong here?

Thank you!
--
**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
[email protected]

Reply via email to