国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

織夢后臺新增多個欄目內容及前臺調用方法

2024-07-12 09:01:51
字體:
來源:轉載
供稿:網友

相信很多織夢建站的站長都會遇到做一下自定義的功能,比如:織夢欄目管理里面在新增一個欄目內容(如圖1所示),這種情況就需要給數據庫單獨在新增一個字段了。接下來教大家解決方法。

image.png

第一步:給dede_arctype數據庫表添加字段, 注:dede_arctype根據自己的數據庫前綴自行調整。
        方法一:系統(tǒng)設置-SQL命令行工具      ALTER TABLE `dede_arctype` ADD `content1` TEXT NOT NULL AFTER `content1` ;
        方法二:phpMyAdmin給dede_arctype表新增字段
                1:dede_arctype表然后選擇結構,在底部選擇與content之后(不填也行),點擊執(zhí)行。

image.png

                   2:新增字段,如圖所示填好后,保存就行。

image.png

第二步:打開dede/catalog_edit.php,
     找到:`content`='$content',(大概在54行左右)
     替換成:
       `content`='$content',

       `content1`='$content1',

第三步:打開dede/templets/catalog_edit.htm,這一步修改很重要。
 1:image.png

function ShowItem1(){  ShowObj('head1'); ShowObj('needset');  HideObj('head2'); HideObj('adset');  HideObj('head3'); HideObj('ctset');  HideObj('head4'); HideObj('ctset1');}   function ShowItem2(){  ShowObj('head2'); ShowObj('adset');  HideObj('head1'); HideObj('needset');  HideObj('head3'); HideObj('ctset');  HideObj('head4'); HideObj('ctset1');}  function ShowItem3(){  ShowObj('head3'); ShowObj('ctset');  HideObj('head1'); HideObj('needset');  HideObj('head2'); HideObj('adset');  HideObj('head4'); HideObj('ctset1');}  function ShowItem4(){  ShowObj('head4'); ShowObj('ctset1');  HideObj('head3'); HideObj('ctset');  HideObj('head1'); HideObj('needset');  HideObj('head2'); HideObj('adset');}

 2:

image.png

 

<table width="100%" border="0" cellspacing="0" id="head1" cellpadding="0">          <tr>             <td colspan="2" bgcolor="#FFFFFF" align="left">           <table border="0" cellpadding="0" cellspacing="0">                <tr>                  <td width="84" height="24" align="center" background="images/itemnote1.gif">&nbsp;常規(guī)選項&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem2()"><u>高級選項</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem3()"><u>單頁面內容</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem4()"><u>底部內容說明</u></a>&nbsp;</td>                </tr>              </table>            </td>          </tr>        </table>                  <table width="100%" border="0" cellspacing="0" id="head2" cellpadding="0" style="display:none">          <tr>            <td colspan="2" bgcolor="#FFFFFF"  style="text-align:left;">          <table height="24" border="0" cellpadding="0" cellspacing="0">                <tr>                   <td width="84" align="center" background="images/itemnote2.gif" bgcolor="#F2F7DF"><a href="#" onClick="ShowItem1()"><u>常規(guī)選項</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote1.gif">高級選項&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem3()"><u>單頁面內容</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem4()"><u>底部內容說明</u></a>&nbsp;</td>                </tr>              </table>            </td>          </tr>       </table>               <table width="100%" border="0" cellspacing="0" id="head3" cellpadding="0" style="display:none">          <tr>            <td colspan="2" bgcolor="#FFFFFF" style="text-align:left;">             <table height="24" border="0" cellpadding="0" cellspacing="0">                <tr>                   <td width="84" align="center" background="images/itemnote2.gif" bgcolor="#F2F7DF"><a href="#" onClick="ShowItem1()"><u>常規(guī)選項</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem2()"><u>高級選項</u>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote1.gif">單頁面內容&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem4()"><u>底部內容說明</u></a>&nbsp;</td>                </tr>              </table>            </td>          </tr>       </table>               <table width="100%" border="0" cellspacing="0" id="head4" cellpadding="0" style="display:none">          <tr>            <td colspan="2" bgcolor="#FFFFFF" style="text-align:left;">             <table height="24" border="0" cellpadding="0" cellspacing="0">                <tr>                   <td width="84" align="center" background="images/itemnote2.gif" bgcolor="#F2F7DF"><a href="#" onClick="ShowItem1()"><u>常規(guī)選項</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem2()"><u>高級選項</u>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif"><a href="#" onClick="ShowItem3()"><u>單頁面內容</u></a>&nbsp;</td>                  <td width="84" align="center" background="images/itemnote2.gif">底部內容說明&nbsp;</td>                </tr>              </table>            </td>          </tr>       </table>


3:image.png

 

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #cfcfcf;background:#ffffff;display:none;text-align:left;" id="ctset1">          <tr>             <td height="28">&nbsp;說明:產品底部內容說明。</td>          </tr>          <tr>             <td style="padding:10px;">                <?php                GetEditor("content1",$myrow['content1'],"450","Default","print","false");                ?>             </td>          </tr>      </table>


至此就修改好了,接下來就行前臺調用了
調用標簽:{dede:field.content1/}


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 上高县| 云龙县| 舟山市| 黄浦区| 大同县| 依兰县| 绥江县| 郁南县| 离岛区| 巴南区| 裕民县| 庆云县| 罗田县| 红原县| 新密市| 呼玛县| 塘沽区| 阿图什市| 观塘区| 古田县| 南郑县| 新安县| 黄梅县| 临桂县| 金塔县| 隆尧县| 公主岭市| 邛崃市| 遂宁市| 驻马店市| 潞西市| 武汉市| 锡林郭勒盟| 湖口县| 屯门区| 黄陵县| 永胜县| 襄汾县| 兴宁市| 北辰区| 清涧县|