NIHVIVO-564 Going back to using toString() methods for template model dump since it already handles nested collections. Improvements to DumpDataModelDirective so it dumps out values as well as variable names.

This commit is contained in:
rjy7 2010-07-29 13:44:53 +00:00
parent 98e5283ab1
commit 1ccde72b40
6 changed files with 111 additions and 53 deletions

View file

@ -0,0 +1,24 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for dumping the template data model -->
<div class="dump datamodel">
<h4>Template data model dump</h6>
<h5>Variables</h5>
<ul>
<#list models?keys as key>
<li><@dump var="${key}" dataModelDump=true /></li>
</#list>
</ul>
<h5>Directives</h5>
<ul>
<#list directives as directive>
<li>${directive}</li>
</#list>
</ul>
</div>

View file

@ -1,8 +1,8 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for dumping array values -->
<#-- Template for dumping sequence (list and array) values -->
<strong>Type:</strong> array<br />
<strong>Type:</strong> sequence (array/list)<br />
<strong>Values:</strong><br />
<ul>
<#list value as item>

View file

@ -6,7 +6,8 @@
<h6>Dump of template variable <em>${var}</em>:</h6>
<#include includeTemplate />
<strong>Type:</strong> ${type}<br />
<strong>Value:</strong> ${value}<br />
</div>

View file

@ -46,12 +46,14 @@
<p><strong>Berries: </strong>${berries}</p>
<#--
<@dump var="now" />
<@dump var="urls" />
<@dump var="fruit" />
<@dump var="trueStatement" />
<@dump var="falseStatement" />
<@dump var="falseStatement" /> -->
<@dump var="zoo1" />
<@dumpDataModel />
${stylesheets.addFromTheme("/sstest.css", "/sstest2.css")}