2011-04-08 88 views
1

我不知道我做了什麼,但suddendly我的代碼沒有按照它應該。幫助一個tpl編輯

我的菜單顯示不正確,因爲我缺少UL結束標記。

我玩的是attatched代碼,但沒有。 Attatched是生成的代碼:

This is what I want
and this is what I get

缺少UL是上線71

請幫助我。

PHP/TPL代碼:

<nav id="categories"> 
<ul class="dropdown dropdown-horizontal"> 
{checkActionsTpl location="tpl_widget_categories_start"} 
{section name=thecat loop=$cat_array} 
{if $lastspacer eq ""}{assign var=lastspacer value=$cat_array[thecat].spacercount}{/if} 
{if $cat_array[thecat].auto_id neq 0} 

{if $cat_array[thecat].spacercount < $submit_lastspacer}</ul></li>{/if} 
{if $cat_array[thecat].spacercount > $submit_lastspacer}<ul>{/if} 

    <li{if $cat_array[thecat].principlecat neq 0} class="dir"{/if}> 
    <a href="{if $pagename eq "upcoming" || $groupview eq "upcoming"} 
        {$URL_queuedcategory, $cat_array[thecat].safename} 
       {else} 
        {$URL_maincategory, $cat_array[thecat].safename|replace:' ':'%20'} 
       {/if} 
       {php} 
    global $URLMethod; 
    if ($URLMethod==2) print "/"; 
    {/php}">{$cat_array[thecat].name}</a> 
    {if $cat_array[thecat].principlecat eq 0}</li>{else}{/if}{assign var=submit_lastspacer value=$cat_array[thecat].spacercount}{/if} 
{/section} 
{checkActionsTpl location="tpl_widget_categories_end"} 
{if $cat_array[thecat].spacercount < $submit_lastspacer}{$lastspacer|repeat_count:'</ul></li>'}{/if} 
     </ul></li> 
</ul> 
</nav> 

回答

1

只是看代碼,我覺得你有

</ul></li> 

以錯誤的方式在三個地方。你想

</li></ul> 
+0

我不這麼認爲。你看過我已經注意到的文件嗎? – 2011-04-11 22:00:25