Imagine this scenario (simplified to illustrate the idea):

json={
 "header":"header stuff",
 "base-url":"https://secret-site-url";,
 "blog-url":"/coolblog",
 "blog-title":"blogishness",
 "post":{
  "title":"sample t",
  "message":"we have a sample of t",
  "author":{
   "name":"joe",
   "moderator":true
   }
  },
 "footer":"footer stuff"
}

------ blog.jt --------
{header}
{blog-title}

{post|include post.jt}

{footer}

------- post.jt -------
<a href="{blog-url|AbsUrl}/post/{post-id|urlencode}">{title}</a>
By {author|include author.jt}
{message}

------- author.jt -------
{.section moderator}<b>{.end}
<a href="{blog-url|AbsUrl}/author/{name|urlencoode}">{name}</a>
{.section moderator}</b>{.end}


You will notice in the included files, that they receive the data they
need for the post or author, but access other variables that would be
found via lookup had this example been coded in a single file. There
are several ways to make this work, but I'm curious what was conceived
for this type of thing originally. It has become a blocker I need to
fix ASAP...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON 
Template" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to