• phpcmsV9常用标签


    1. 头部:
      <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
      
      <meta name="keywords" content="{$SEO['keyword']}">
      
      <meta name="description" content="{$SEO['description']}">
      
    2. 常用系统常量: {CSS_PATH} {JS_PATH} {IMG_PATH} {APP_PATH}//程序目录例如:

      <link type="text/css" rel="stylesheet" href="{CSS_PATH}qi/index.css" />
      <script type="text/javascript" src="{JS_PATH}qijs/index.js"></script>
      
    3. 模板包含:{template "content","header"} {template "content","footer"}这里是引入头部和尾部

    4. 常用调用数据

      {pc:content action="lists" catid="6" num="8" order="inputtime DESC" }
      
      {loop $data $r}
      
      <li><span class="date">({date('Y/m/d H:m:s',$r[inputtime])})</span><a href="{$r[url]}" target="_blank" title="{$r[title]}">{str_cut($r[title],'28')}</a></li>
      
      {/loop}
      
      {/pc}
      
      {str_cut(strip_tags($r[description]), 165)}
      
    5. 一级栏目调用:

      {pc:content action="category" catid="0" num="8" siteid="$siteid" order="listorder ASC"}
      
      {loop $data $r}
      
      <li><a href="{$r[url]}" title="{$r[catname]}">{$r[catname]}</a></li>
      
      {/loop}
      
      {/pc}
      
    6. 文章列表页调用关键字,或者首页调用关键字:

      {pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}
      
      {loop $data $r}
      
      <a href="{$r[url]}">{$r[title]}</a>
      
      php $keywords = explode(',',$r[keywords]);}
      
      <b>文章标签:</b>
      
      {loop $keywords $keyword}
      
      <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&tag={urlencode($keyword)}" class="blue"> {$keyword}</a>
      
      {/loop}
      
      {/loop}
      
      {/pc}
      
    7. 当前栏目名称:{$catname}

    8. 缩略图名称:{$r[thumb]}

    9. 列表内容显示(带分页):

      <div class="news_list2">
      
      <ul>
      
      {pc:content action="lists" catid="$catid" num="20" order="id DESC" page="$page"}
      
      {loop $data $r}
      
      <li><span class="date">{date('Y-m-d H:i:s',$r[inputtime])}</span><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></li>
      
      {/loop}
      
      </ul>
      
      <div id="pages" class="text-c">{$pages}</div>
      
      {/pc}
      
      </div>
      

        

        

        

          

  • 相关阅读:
    Python+Selenium+PhantomJS下载JavaScript异步加载网页
    Java模拟post提交表单数据
    在nltk中调用stanfordparser处理中文
    Clustering text documents using k-means
    Classification of text documents: using a MLComp dataset
    Analyzing the Meaning of Sentences
    Identifying Dialogue Act Type
    jquery $.ajax()获取服务器上的json数据
    关于ie6中存在的最小的高度
    让两个元素水平对齐
  • 原文地址:https://www.cnblogs.com/douchenchen/p/7088185.html
Copyright © 2020-2023  润新知