dongxing4643 2011-04-08 03:56
浏览 60

帮助编辑tpl

I don't know what I did but suddendly my code isn't acting as it should.

My menu is not showing correctly because I am missing a UL closing tag.

I played with the attatched code but nothing. Attatched is the generated code:

This is what I want
and this is what I get

The missing ul is on line 71.

Please help me.

PHP / TPL Code:

<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条回答 默认 最新

  • dongqin5604 2011-04-08 08:00
    关注

    Just looking at the code, I think you have

    </ul></li>
    

    the wrong way round in three places. You want

    </li></ul>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数