phpcms头部代码详细分析


  
  
  
  
  
  
  
  {if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}
  
  
  
  
  
  
  



  
  
  
  

  

  {pc:content action="position" posid="9" order="id" num="10" cache="3600"}
  
  

  

      {loop $data $k $v}
      
      
  • {$v[title]}

  •   {/loop}
      

  

  {/pc}
  
  
  
  

  

  

  
  
  
  复制代码
  
  {CHARSET}” =字符集 (gbk或者utf-8)
  
  {if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}
  判断语句 翻译:如果设置了标题并且标题不为空,则显示标题,否则显示网站名称
  
  
  
  
  上面2行是外部css的调用{CSS_PATH}



  上面3行是网页的js调用
  
  
  

  

  {pc:content action=”position” posid=”9″ order=”id” num=”10″ cache=”3600″}
  

  

      {loop $data $k $v}
      
  • {$v[title]}

  •   {/loop}
      

  

  {/pc}
  
  
  

  

  

  

  下面是搜索部分
  

  

  {php $j=0}
  {php $search_model = getcache(‘search_model_’.$siteid, ‘search’);}
  {loop $search_model $k=>$v}
  {php $j++;}
  {$v['name']}{if $j != count($search_model)} | {/if}
  {/loop}
  {php unset($j);}
  

  

  
  
  
  
  
  
  

  

  

  搜索部分结束
  

  

  

  
  {pc:content action=”category” catid=”0″ num=”25″ siteid=”$siteid” order=”listorder ASC”}
  
  {/pc}
  

  

  {if $top_parentid}
  

  {pc:content action=”category” catid=”$top_parentid” num=”15″ siteid=”$siteid” order=”listorder ASC”}
  {loop $data $r}
  {$r[catname]} |
  {/loop}
  {/pc}
  {if $modelid}搜索{/if}
  

  {/if}
  

你可能感兴趣的:(phpcms头部代码详细分析)