AngelDoReMi / closure-templates

Automatically exported from code.google.com/p/closure-templates
Apache License 2.0
0 stars 0 forks source link

Issue in rendering the following template #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a .soy file as follows,i am not able to render it properly,can any one 
help me out to render this is proper way using java
{namespace test}

/**
 * create a menu with optional submenus
 * @param menuConf The configuration of menu
 */
{template .menu}
    {if $menuConf.container}
        <{$menuConf.container} class="{$menuConf.contClass}">
    {/if}
    {if $menuConf.items}
        <ul {if $menuConf.id}id="{$menuConf.id}"{/if} class="{$menuConf.class}">
            {foreach $item in $menuConf.items}
                {if $item.class}
                    <li class="{$item.class}">
                {else}
                    <li>
                {/if}
                <a href="{$item.link}">
                    {$item.caption}
                </a>
                {if $menuConf.helper}
                    <{$menuConf.helper}></{$menuConf.helper}>
                {/if}
                {if $item.items}
                    {call .menu}
                      {param menuConf: $item /}
                    {/call}         
                {/if}
            </li>
            {/foreach}
        </ul>
    {/if}
    {if $menuConf.container}
        </{$menuConf.container}>
    {/if}   
{/template}

Original issue reported on code.google.com by sheetalr...@gmail.com on 21 Sep 2011 at 11:10

GoogleCodeExporter commented 8 years ago
What are you trying and what error do you see?

Original comment by mikesamuel@gmail.com on 22 Sep 2011 at 7:37

GoogleCodeExporter commented 8 years ago
I am trying to render this tempalte using java,the issue is with if conditions 
rendering ,can you please show this with an example.

Original comment by sheetalr...@gmail.com on 23 Sep 2011 at 8:47

GoogleCodeExporter commented 8 years ago
Closure Templates has migrated to GitHub: 
https://github.com/google/closure-templates.

Please reopen there if it's still an issue for you.

Original comment by brendan....@gmail.com on 26 Feb 2015 at 11:58