PHPCMS之 列表和內容頁

來源:互聯網
上載者:User

標籤:cell   input   highlight   cms   category   內容   ==   動態   友情   

上一篇隨筆中降到了一些相似的文法可以來後台管理網頁的內容,下面就是關於列表的管理

加入一級欄目中有幾個有二級菜單的,那麼就可以把相應的介面建立一個副本,然後修改裡面欄目的一些屬性

123456789 {pc:content action="category" catid="$parentid" num="25" siteid="$siteid" order="listorder ASC"}  <br>  <!--$parentid 是父級的id,只有是父級id才會跳轉-->   {loop $data $r}      {if $catid==$r[catid] || $top_parentid==$r[catid]}          <a href="{$r[url]}"><div class="left-item sel">{$r[catname]}</div>  </a>      {else}          <a href="{$r[url]}"><div class="left-item">{$r[catname]}</div></a>        {/if}                     {/loop}{/pc}

右邊的內容是和上一篇隨筆最後內容是一樣的修改方法,實踐做項目的時候就可以運用了

首先把要用到的內容頁複製到www目錄下的content檔案下

然後用軟體開啟,去頭部和尾部,然後引用頭部尾部代碼

123 {template "content","header"}  <link href="{CSS_PATH}css/ListStyle.css" rel="stylesheet" />
1 {template "content","footer"}

然後看下結果,應該可以正常現實了。

(1)列表中的內容要和背景一致,要遍曆了

123456789101112 {pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}       {loop $data $r}                               {if $catid==$r[catid] || $top_parentid==$r[catid]}                 <a href="{$r[url]}"><div class="left-item sel">{$r[catname]}</div>  </a>                                     {else}                 <a href="{$r[url]}"><div class="left-item">{$r[catname]}</div></a>              {/if}                              {/loop}{/pc}

(2)點開動態標題進入標題的幾個文章,單擊文章進入瀏覽文章內容

123456 其中文章標題是::{$title}來源::{$copyfrom}發布時間::{$inputtime}瀏覽時間::<span id="hits"></span><script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>

(3)友情連結

12345 {pc:link  action="type_list" typeid="0" siteid="$siteid" linktype="1" order="listorder DESC" num="8" return="pic_link"}    {loop $pic_link $v}      <a href="{$v[‘url‘]}">{$v[‘name‘]}</a>      {/loop}{/pc}

(4)點擊人才的圖片,應該進入介紹頁面,所以在人才資訊的那裡,填寫遍曆的圖片資訊的框中有一個“轉向連結”

 

(5)單頁面

單擊“管理欄目”中的“範本管理員”-----“添加單網頁”,在下面的視窗中填寫資訊,在模板風格中要選擇自己的模板

 

在網頁中就出來了“關於我們”,單擊的時候就進入了一個頁面

管理單頁面的內容

PHPCMS之 列表和內容頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.