婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 網站建設 > 建站知識 > 織夢后臺新增多個欄目內容及前臺調用方法

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

POST TIME:2021-05-23 02:36

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

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

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

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

       `content1`='$content1',

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

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:

 

<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;常規選項&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>常規選項</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>常規選項</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>常規選項</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:

 

<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/}




收縮
  • 微信客服
  • 微信二維碼
  • 電話咨詢

  • 400-1100-266
主站蜘蛛池模板: 南城县| 马关县| 霞浦县| 思茅市| 贵定县| 汶上县| 延津县| 苍梧县| 湘潭市| 河间市| 噶尔县| 荥阳市| 怀宁县| 河西区| 名山县| 全南县| 嘉祥县| 汝阳县| 九台市| 资源县| 丹江口市| 洞口县| 自贡市| 台北市| 景东| 仪征市| 封丘县| 乌拉特前旗| 凤凰县| 昔阳县| 石楼县| 桑植县| 华宁县| 福清市| 平谷区| 渭南市| 仁布县| 玛沁县| 乌拉特后旗| 辰溪县| 长海县|