精品国产免费观看久久久_久久天天躁狠狠躁夜夜爽_无码人妻少妇久久中文字幕_狠狠做深爱婷婷久久综合一区

學習筆記

精準傳達 ? 價值共享

洞悉互聯網前沿資訊,探尋網站營銷規律

查看其它板塊

織夢文章內容頁使用不同的模板_獨立內容頁模板

作者:狐靈科技 | 2020-02-22 15:50 |點擊:

織夢讓文章內容頁使用不同的模板,不同的模板風格

織夢內容頁獨立內容模板,可以讓文章不同樣式展示

織夢文章內容頁使用不同的模板_獨立內容頁模板

1、后臺-系統-SQL命令行工具-執行

ALTER TABLE `dede_archives` ADD `tempname` VARCHAR( 40 ) NOT NULL DEFAULT '';

 

2、后臺文檔發布模板里添加表單

文章模型的是
 

  • 文章模型的是

    • dede/templets/article_add.htm
    • dede/templets/article_edit.htm

    圖集模型的是

    • dede/templets/album_add.htm
    • dede/templets/album_edit.htm

    軟件模型的是

    • dede/templets/soft_add.htm
    • dede/templets/soft_edit.htm

    商品和自定義模型的是

    • dede/templets/archives_add.htm
    • dede/templets/archives_edit.htm
  • 根據你自己的模型來添加表單,搜索自定義文件名
  • 發布和編輯都是插入如下的代碼
    <script type="text/javascript">
    function SelectTemplets(fname)
    {
    	var posLeft = 200;
    	var posTop = 300;
    	window.open("../include/dialog/select_templets.php?f="+fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left="+posLeft+", top="+posTop);
    }
    </script>
    <tr>
    	<td colspan="2">
    		<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:3px;">
    			<tr> 
    				<td width="90" class="bline" height='24'>&nbsp;自定義模板:</td>
    				<td class="bline"><input type='text' name="tempname" id="tempname" style='width:300px' class='text' value="<?php echo $arcRow['tempname']; ?>" /> <input name='diytemp_bt' type='button' class='inputbut' value='瀏覽...' onClick="SelectTemplets('form1.tempname')" />
    				</td>
    			</tr>
    		</table>
    	</td>
    </tr>

     

    3、后臺文檔發布和編輯處理php文件修改

    文章模型的是

    • dede/article_add.php
    • dede/article_edit.php

    圖集模型的是

    • dede/album_add.php
    • dede/album_edit.php

    軟件模型的是

    • dede/soft_add.php
    • dede/soft_edit.php

    商品和自定義模型的是

    • dede/archives_add.php
    • dede/archives_edit.php

    打開對應的文檔發布處理,php文件是 xxx_add.php

    找到

    ,weight

    改成

    ,weight,tempname

    繼續找到

    ,'$weight'

    改成

    ,'$weight','$tempname'

    文檔編輯處理php文件是 xxx_edit.php

    找到

    weight='$weight'

    改成

    weight='$weight',tempname='$tempname'

     

    4、/include/arc.archives.class.php 找到

    $this->Fields['filename'] = empty($this->Fields['filename'])? '' : $this->Fields['filename'];

    在它下面加入

    $this->Fields['tempname'] = empty($this->Fields['tempname'])? '' : $this->Fields['tempname'];

    繼續找到

    $cid = $this->ChannelUnit->ChannelInfos['nid'];

    在它下面加入

    $this->Fields['tempname'] = empty($this->Fields['tempname'])? '' : $this->Fields['tempname'];

    繼續找到

    $filetag = str_replace('{tid}', $tid,$filetag);

    在它下面加入

    if(!empty($this->Fields['tempname'])) $filetag = $this->Fields['tempname'];

    完成

     


如沒特殊注明,文章均為狐靈科技原創,轉載請注明?? "織夢文章內容頁使用不同的模板_獨立內容頁模板
多一份免費策劃方案,總有益處。

請直接添加技術總監微信聯系咨詢

網站設計 品牌營銷

多一份參考,總有益處

聯系狐靈科技,免費獲得專屬《策劃方案》及報價

咨詢相關問題或預約面談,可以通過以下方式與我們聯系

業務熱線:15082661954 / 大客戶專線:15523356218