Skip to content

Instantly share code, notes, and snippets.

@jeffremer
Created February 18, 2011 00:13
Show Gist options
  • Save jeffremer/833021 to your computer and use it in GitHub Desktop.
Save jeffremer/833021 to your computer and use it in GitHub Desktop.
Example of relations and hidden nodes.
{
"nodeValue": [{
"nodeName": "div",
"attributes": {
"id": "main",
"class": "floatLeft",
"rel": "controller"
},
"nodeValue": [{
"attributes": {
"rel": "controller-navigation"
}
},
{
"attributes": {
"title": "Tabs",
"rel": "controller-child",
"class": "card card2"
},
"nodeValue": "<h2>Introducing Tabs</h2><p>This changes everything.</p>"
},
{
"attributes": {
"title": "Article",
"rel": "controller-child-hidden",
"class": "card card3"
},
"nodeValue": "${components.0}"
},
{
"attributes": {
"title": "Conversation",
"rel": "controller-child",
"class": "card conversation"
},
"nodeValue": "${components.1}"
},
{
"attributes": {
"title": "Feed",
"rel": "controller-child,has-a:${components.0}",
"class": "card card2 feed"
},
"nodeValue": "${components.2}"
}
]
},
{
"nodeName": "div",
"attributes": {
"id": "rightHand",
"class": "floatRight"
},
"nodeValue": [{
"attributes": {
"id": "sidebar",
"rel": "controller"
},
"nodeValue": [
{
"attributes": {
"title": "Share",
"rel": "controller-child",
"class": "card share"
},
"nodeValue": "${components.3}"
},
{
"attributes": {
"title": "Video",
"rel": "controller-child",
"class": "card card2 video"
},
"nodeValue": "${components.4}"
},
{
"attributes": {
"title": "Widget",
"rel": "controller-child",
"class": "card card3"
},
"nodeValue": "${components.5}"
}
]
}]
},
{
"attributes": {
"style": "clear: both;"
}
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment