[eluser]Unknown[/eluser]
I am planning on using CI for a new project, and have been flicking through the documentation etc. to get an idea on implementation. I am quite interested in the template parser class as it seems to have the potential to provide some useful functionality. I have a few questions that are not covered by the documentation however...
The basic template example as in the docs follows...
Code:
<html>
<head>
<title>{blog_title}</title>
</head>
<body>
<h3>{blog_heading}</h3>
{blog_entries}
<h5>{title}</h5>
<p>{body}</p>
{/blog_entries}
</body>
</html>
If I do not provide an array for {blog_entries} in the merged array, will it still display one instance of the contents of the block, or will it hide it entirely?
Also, is the template system capable of recursion? I mean does the following work (if I pass the class a multidimensional array, allowing me to have any number of level_2's within each level_1 block?
Code:
{level_1}
<h3>{title}</h3>
{level_2}
<h4>{title}</h4>
{/level_2}
{/level_1}
Any answers on these question would be greatly appreciated!
Thanks in advance.