{"id":30388,"date":"2024-11-25T12:40:44","date_gmt":"2024-11-25T04:40:44","guid":{"rendered":"https:\/\/fwq.ai\/blog\/30388\/"},"modified":"2024-11-25T12:40:44","modified_gmt":"2024-11-25T04:40:44","slug":"dedecms%e5%88%97%e8%a1%a8%e9%a1%b5%e6%80%8e%e4%b9%88%e8%b0%83%e7%94%a8%e5%bd%93%e5%89%8d%e6%a0%8f%e7%9b%ae%e7%88%b6%e7%ba%a7%e6%a0%8f%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/30388\/","title":{"rendered":"DEDECMS\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee"},"content":{"rendered":"<p style=\"text-align: center\"><strong><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/020\/5df82a04b2c14713.jpg\" class=\"aligncenter\" title=\"DEDECMS\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee\u63d2\u56fe\" alt=\"DEDECMS\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee\u63d2\u56fe\" \/><\/strong><\/p>\n<p><strong>\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee?<\/strong><\/p>\n<p>\u672c\u6587\u5b9e\u4f8b\u8bb2\u8ff0\u4e86DEDECMS\u5217\u8868\u9875\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee\u7684\u65b9\u6cd5\u3002\u5206\u4eab\u7ed9\u5927\u5bb6\u4f9b\u5927\u5bb6\u53c2\u8003\u3002\u5177\u4f53\u5b9e\u73b0\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<p>\u4fee\u6539\u65b9\u6cd5\u5982\u4e0b<\/p>\n<p>\u9996\u5148\u627e\u5230\u5982\u4e0b\u4ee3\u7801:<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>if($type=='top')&nbsp;\n{&nbsp;\n$sql&nbsp;=&nbsp;\"SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp;\nFrom&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid=0&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;\";&nbsp;\n}&nbsp;\nelse&nbsp;if($type=='son')&nbsp;\n{&nbsp;\nif($typeid==0)&nbsp;return&nbsp;'';&nbsp;\n$sql&nbsp;=&nbsp;\"SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp;\nFrom&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid='$typeid'&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;\";&nbsp;\n}&nbsp;\nelse&nbsp;if($type=='self')&nbsp;\n{&nbsp;\nif($reid==0)&nbsp;return&nbsp;'';&nbsp;\n$sql&nbsp;=&nbsp;\"SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp;\nFROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid='$reid'&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;\";&nbsp;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7136\u540e\u5c06\u4e0b\u9762\u4ee3\u7801\u62f7\u8d1d\u5230\u5176\u540e\u9762:<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>else&nbsp;if($type=='topone')&nbsp;\n{&nbsp;\nif($reid==0)&nbsp;return&nbsp;'';&nbsp;\n$rowR&nbsp;=&nbsp;$dsql-&amp;gt;GetOne(\"SELECT&nbsp;*&nbsp;FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;id='$typeid'&nbsp;\");&nbsp;\n$topids&nbsp;=&nbsp;$rowR['topid'];&nbsp;\n$sql&nbsp;=&nbsp;\"SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp;\nFROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid='0'&nbsp;And&nbsp;id='$topids'&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;\";&nbsp;\n}&nbsp;\nelse&nbsp;if($type=='fatherlist')&nbsp;\n{&nbsp;\n$rowR&nbsp;=&nbsp;$dsql-&amp;gt;GetOne(\"SELECT&nbsp;*&nbsp;FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;id='$typeid'&nbsp;\");&nbsp;\n$reid&nbsp;=&nbsp;$rowR['reid'];&nbsp;\n$rowR&nbsp;=&nbsp;$dsql-&amp;gt;GetOne(\"SELECT&nbsp;*&nbsp;FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;id='$reid'&nbsp;\");&nbsp;\n$reid&nbsp;=&nbsp;$rowR['reid'];&nbsp;\n$sql&nbsp;=&nbsp;\"SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp;\nFROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid='$reid'&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;\";&nbsp;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8bf4\u660etopone\u662f\u8c03\u7528\u5f53\u524d\u76ee\u5f55\u5bf9\u5e94\u7684\u9876\u7ea7\u76ee\u5f55&#8217;fatherlist&#8217; \u662f\u8c03\u7528\u4e0a\u4e00\u7ea7\u76ee\u5f55,\u5f53\u524d\u76ee\u5f55\u5bf9\u5e94\u7684\u9876\u7ea7\u76ee\u5f55\u6807\u8bb0:<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>{dede:channel&nbsp;type='topone'}[field:typename\/]{\/dede:channel}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u4e2a\u65b9\u6cd5\u7edd\u5bf9\u53ef\u4ee5,\u5982\u679c\u60f3\u7528\u94fe\u63a5\u7684\u8bdd,\u5c31\u8981[field:typeurl].<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fDEDECMS\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee? \u672c\u6587\u5b9e\u4f8b\u8bb2\u8ff0\u4e86DEDECMS\u5217\u8868\u9875\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee\u7684\u65b9\u6cd5\u3002\u5206\u4eab\u7ed9\u5927\u5bb6\u4f9b\u5927\u5bb6\u53c2\u8003\u3002\u5177\u4f53\u5b9e\u73b0\u65b9\u6cd5\u5982\u4e0b\uff1a \u4fee\u6539\u65b9\u6cd5\u5982\u4e0b \u9996\u5148\u627e\u5230\u5982\u4e0b\u4ee3\u7801: \u4ee3\u7801\u5982\u4e0b: if($type==&#8217;top&#8217;)&nbsp; {&nbsp; $sql&nbsp;=&nbsp;&#8220;SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp; From&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid=0&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;&#8220;;&nbsp; }&nbsp; else&nbsp;if($type==&#8217;son&#8217;)&nbsp; {&nbsp; if($typeid==0)&nbsp;return&nbsp;&#8221;;&nbsp; $sql&nbsp;=&nbsp;&#8220;SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp; From&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid=&#8217;$typeid&#8217;&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;&#8220;;&nbsp; }&nbsp; else&nbsp;if($type==&#8217;self&#8217;)&nbsp; {&nbsp; if($reid==0)&nbsp;return&nbsp;&#8221;;&nbsp; $sql&nbsp;=&nbsp;&#8220;SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp; FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid=&#8217;$reid&#8217;&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;&#8220;;&nbsp; } \u767b\u5f55\u540e\u590d\u5236 \u7136\u540e\u5c06\u4e0b\u9762\u4ee3\u7801\u62f7\u8d1d\u5230\u5176\u540e\u9762: \u4ee3\u7801\u5982\u4e0b: else&nbsp;if($type==&#8217;topone&#8217;)&nbsp; {&nbsp; if($reid==0)&nbsp;return&nbsp;&#8221;;&nbsp; $rowR&nbsp;=&nbsp;$dsql-&amp;gt;GetOne(&#8220;SELECT&nbsp;*&nbsp;FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;id=&#8217;$typeid&#8217;&nbsp;&#8220;);&nbsp; $topids&nbsp;=&nbsp;$rowR[&#8216;topid&#8217;];&nbsp; $sql&nbsp;=&nbsp;&#8220;SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp; FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid=&#8217;0&#8242;&nbsp;And&nbsp;id=&#8217;$topids&#8217;&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;&#8220;;&nbsp; }&nbsp; else&nbsp;if($type==&#8217;fatherlist&#8217;)&nbsp; {&nbsp; $rowR&nbsp;=&nbsp;$dsql-&amp;gt;GetOne(&#8220;SELECT&nbsp;*&nbsp;FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;id=&#8217;$typeid&#8217;&nbsp;&#8220;);&nbsp; $reid&nbsp;=&nbsp;$rowR[&#8216;reid&#8217;];&nbsp; $rowR&nbsp;=&nbsp;$dsql-&amp;gt;GetOne(&#8220;SELECT&nbsp;*&nbsp;FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;id=&#8217;$reid&#8217;&nbsp;&#8220;);&nbsp; $reid&nbsp;=&nbsp;$rowR[&#8216;reid&#8217;];&nbsp; $sql&nbsp;=&nbsp;&#8220;SELECT&nbsp;id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath&nbsp; FROM&nbsp;`dede_arctype`&nbsp;WHERE&nbsp;reid=&#8217;$reid&#8217;&nbsp;And&nbsp;ishidden1&nbsp;order&nbsp;by&nbsp;sortrank&nbsp;asc&nbsp;limit&nbsp;0,&nbsp;$line&nbsp;&#8220;;&nbsp; } \u767b\u5f55\u540e\u590d\u5236 \u8bf4\u660etopone\u662f\u8c03\u7528\u5f53\u524d\u76ee\u5f55\u5bf9\u5e94\u7684\u9876\u7ea7\u76ee\u5f55&#8217;fatherlist&#8217; \u662f\u8c03\u7528\u4e0a\u4e00\u7ea7\u76ee\u5f55,\u5f53\u524d\u76ee\u5f55\u5bf9\u5e94\u7684\u9876\u7ea7\u76ee\u5f55\u6807\u8bb0: \u4ee3\u7801\u5982\u4e0b: {dede:channel&nbsp;type=&#8217;topone&#8217;}[field:typename\/]{\/dede:channel} \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u4e2a\u65b9\u6cd5\u7edd\u5bf9\u53ef\u4ee5,\u5982\u679c\u60f3\u7528\u94fe\u63a5\u7684\u8bdd,\u5c31\u8981[field:typeurl]. \u4ee5\u4e0a\u5c31\u662fDEDECMS\u5217\u8868\u9875\u600e\u4e48\u8c03\u7528\u5f53\u524d\u680f\u76ee\u7236\u7ea7\u680f\u76ee\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-30388","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=30388"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/30388\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=30388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=30388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=30388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}